Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by karthikmanivel · Mar 15, 2019 at 07:10 AM · httphttps

In my URL, when using http, its working. When using https, its not working. Why? code attached below

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.Networking; using System.Security.Cryptography.X509Certificates; using System;

public class Calculation : MonoBehaviour {

 string jsonResult;
 Helper.displayBoard[] displayInfo;
 public Text E20, E40, E45;
 public Text F20, F40, F45;
 public Text T20, T40, T45;
 

 // Use this for initialization
 void Start()
 {
     E20 = GameObject.Find("E20").GetComponentInChildren<Text>();
     E40 = GameObject.Find("E40").GetComponentInChildren<Text>();
     E45 = GameObject.Find("E45").GetComponentInChildren<Text>();
     F20 = GameObject.Find("F20").GetComponentInChildren<Text>();
     F40 = GameObject.Find("F40").GetComponentInChildren<Text>();
     F45 = GameObject.Find("F45").GetComponentInChildren<Text>();
     T20 = GameObject.Find("T20").GetComponentInChildren<Text>();
     T40 = GameObject.Find("T40").GetComponentInChildren<Text>();
     T45 = GameObject.Find("T45").GetComponentInChildren<Text>();
 
     StartCoroutine(LoadData());
     //displydata();
 }

 // Update is called once per frame
 void Update()
 {

 }


IEnumerator LoadData() { / string contUrl = "http://961.8.144.142:9080/conslot/getContainerStatistics3d";/ string contUrl = "https://961.8.144.142:9080/conslot/getContainerStatistics3d";

     using (UnityWebRequest www = UnityWebRequest.Get(contUrl))
     {
         yield return www.Send();
         if (www.isNetworkError || www.isHttpError)
         {
             Debug.Log(www.error);
         }
         else
         {
             jsonResult = System.Text.Encoding.UTF8.GetString(www.downloadHandler.data);
             // Debug.Log(jsonResult);
             jsonResult = jsonResult.Split(new string[] { "[" }, System.StringSplitOptions.None)[1];
             jsonResult = jsonResult.Split(new string[] { "]" }, System.StringSplitOptions.None)[0];
             displayInfo = Helper.JsonHelper.getJsonArray<Helper.displayBoard>(jsonResult);
             foreach (Helper.displayBoard displayInf in displayInfo)
             {
                 E20.text = displayInf.e20;
                 F20.text = displayInf.f20;
                 E40.text = displayInf.e40;
                 F40.text = displayInf.f40;
                 E45.text = displayInf.e45;
                 F45.text = displayInf.f45;

                 T20.text = (int.Parse(displayInf.e20) + int.Parse(displayInf.f20)).ToString();
                 T40.text = (int.Parse(displayInf.e40) + int.Parse(displayInf.f40)).ToString();
                 T45.text = (int.Parse(displayInf.e45) + int.Parse(displayInf.f45)).ToString();
             }
         }
     }
 }

}

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image misher · Mar 15, 2019 at 04:24 PM 0
Share

Are you sure about IP being 961.8.144.142 and not 196.8.144.142 or 169.8.144.142? Are you sure that your server actually has HTTPS set up correctly with valid certificate?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by karthikmanivel · Mar 15, 2019 at 06:08 PM

Yes, correct setup only

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

166 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity www class connect to https ip; Unknown Error. 0 Answers

WWW class and UnityWebRequest no longer working in Unity 2017.3.0 5 Answers

HTTP GET Method in C# Unity 3D - How to target specific text or header 1 Answer

how to solve webgl.loader.js:1 Unable to parse Build/webgl.framework.js.br Response Header "Content-Encoding: br" present 0 Answers

[ASP.NET] [WEB API] Problem with HttpWebRequest.ContentType 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges