Quantcast
Viewing all 190 articles
Browse latest View live

About Implemented host name resolution with IPv6 in Unity 4.6.9 release-notes.

Hi, Unity team.

I have question about release-notes of unity-4.6.9.
It is "Implemented host name resolution with IPv6".

but, When I use "HttpWebRequest" on iOS9 device(Unity 4.6.9 build), I found the DNS error.
The error is "NameResolutionFailure".

I will teach a procedure.
  1. Make DNS64/NAT64 access point on Mac.
    (https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html)
  2. iOS9 device connect to access point.
  3. Execute test code
    --------------
    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("Domain Name");
    webRequest.Method = "POST";
    Stream stream = webRequest.GetRequestStream();
    --------------
  4. I found the error "NameResolutionFailure".

About "Implemented host name resolution with IPv6", will you tell me concretely?
and, Can you resolve this error?
Please tell me how to resolve this error.

Best regards,
Haruki

Building for Windows 10 gives error for HttpWebRequest and StreamWriter

The game runs perfectly in the editor![alt text][1] [1]: /storage/temp/60431-windows-10-error.jpg

Where to continue in Response/request?

Hey all, So i was working on my login form (with works), now i can't remember anymore where i need to write the next method call to continue after the login response was positive to login. Can you give me hint? myAPI.Login(request, (result) => { // Store User specific data Id = result.Id; sessionTicket = result.SessionTicket; }, (error) => { Debug.Log("Error logging in the user:"); Debug.Log(error.ErrorMessage); } );

WWW does not show Location in header response (302/Redirect)

There are some nice guides out there on how to manually handle redirects (HTTP code 302) using the Unity WWW class. See: http://answers.unity3d.com/questions/143863/doesnt-www-like-http-302-redirect.html http://forum.unity3d.com/threads/issues-with-wwwform-necessary-data-rewind-wasnt-possible.64152/ There's one thing though... when scanning the response headers for a 'Location' header it doesn't show? Using Fiddler (or WireShark) I can see that the response does indeed have this header: ![alt text][1] ..so using this piece of code in Unity I'm expecting to have it listed: ![alt text][2] But that is not the case. Here's the Unity console log (five headers found): - STATUS HTTP/1.1 302 Found - X-POWERED-BY Someone - CACHE-CONTROL private, no-cache, no-store, must-revalidate - EXPIRES -1 - PRAGMA no-cache Anyone have an idea? [1]: /storage/temp/63705-fiddler.jpg [2]: /storage/temp/63706-fiddler2.jpg

Are double response headers supported in unity?

Server sends me back two Set-Cookie headers. However, when I debug all headers in unity only the last one is visible. Is there a way to retrieve first Set-Cookie data? Thanks

Why current culture is always en-US and what is the alternative ?

Hello everybody, I'm using the WWW class to perform a https request and I don't specify accept-language in the headers. My problem is: the server receives always en-US as Accept-Language in the headers of the request, regardless of the real country of the user. I want to retrieve the currentCulture of the user and pass it to the WWW class. But I don't know how to retrieve it ! I read in another threads that System.Globalization.CultureInfo.CurrentCulture and System.Threading.Thread.CurrentThread.CurrentCulture are set to "en-US" by default. Do you know another way to retrieve the culture code ? PS: I would like to avoid using a geolocation plugin as much as I can because our server relies on currentculture instead of ips to detect the location of the user. It would represent a heavy update to filter by ip rather than culture code. Thank you for your help guys !

Serialize JSON with invalid C# names

Hi all I have an existing Rest API I'm trying to use that has JSON like so ` { header-property1: "yo", header-property2: 42 } ` Unfortunately trying to use JsonUtility requires that I name the field on the class the same as the property or key on the JSON side. Sadly C# does not support the `-` as a valid character in a name. Does anyone know how to make this happen?

WWW yield is not returning any value in ios for yahoo finance api

Hi All, I am getting the stock value from yahoo finance and displaying it in a Text UI component. The below code is working fine in Windows PC, Mac, Android mobile but not in iOS. Code is not getting executed after " yield return wwwEricA;" only for yahoo finance http link "http://finance.yahoo.com/d/quotes.csv?s=ERIC-A.ST&f=sl1d1t1c1p2ohgv&e=.csv" . For testing i have given "https://www.google.co.in/" and that is returning value in ios mobile also. So i guess the problem is only with that particular yahoo URL but could not find what is that. Please help me to solve this issue. Code : public Text EricAStockText; private WWW wwwEricA; private string stockUrlEricA; private string[] stockArrayEricA; private char[] seperators = { ',' }; void Start() { stockUrlEricA = "http://finance.yahoo.com/d/quotes.csv?s=" + WWW.EscapeURL("ERIC-A.ST&f=sl1d1t1c1p2ohgv&e=.csv"); StartCoroutine(GetStockValueA(stockUrlEricA)); } private IEnumerator GetStockValueA(string URL) { wwwEricA = new WWW(URL); yield return wwwEricA; stockArrayEricA = ParseStockValue(wwwEricA.text, seperator); EricAStockText.text = stockArrayEricA[1]; } private string[] ParseStockValue(string valueString, char[] seperator) { return valueString.Split(seperator, System.StringSplitOptions.RemoveEmptyEntries); }

get a mysterious problem,when i use HttpWebRequest in unity c# script.

in script,i use HttpWebRequest to get service from network.but it comes a mysterious problem. the source code: string url = "http://apis.baidu.com/apistore/vop/baiduvopjson"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); print(request.Address); request.Method = "get"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream s = response.GetResponseStream(); StreamReader Reader = new StreamReader(s, Encoding.UTF8); string strValue = ""; strValue = Reader.ReadToEnd(); print (strValue); the result is like(i have copy the html to a html file): ![alt text][1] [1]: /storage/temp/69776-1.jpg but the mysterious problem comes.when i use this code in Visual studio c# project,here is the source code: string url = "http://apis.baidu.com/apistore/vop/baiduvopjson"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "get"; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream s = response.GetResponseStream(); StreamReader Reader = new StreamReader(s, Encoding.UTF8); string strValue = ""; strValue = Reader.ReadToEnd(); Console.WriteLine(strValue); the result which is true in fact is as follows: {"errNum":300202,"errMsg":"Missing apikey"} do some one know what mistake do i make in unity project? why can i get the ture httpweb response?

How to stop mono from preventing authentication

Hi everyone! I am trying to connect to a server that requires a client certificate. I connect with httpWebRequest, and in a console App I made in Visual Sudio, it works like a charm! But when I try it in Unity, it doesn't work. (the 2 are identical) It throws me this TlsException at the GetResponse: > TlsException: The authentication or decryption has failed.> Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc)> Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult)> Rethrow as WebException: Error getting response stream (ReadDone1): ReceiveFailure> System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)> System.Net.HttpWebRequest.GetResponse () So, from what I understand, the problem comes from Mono that prevent the authentication for some security reasons. Any idea how to override it? Here is the code used if it can help: ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(ValidateServerCertificate); X509Certificate2 clientCertificate = new X509Certificate2(path + ".p12", "password"); byte[] data = Encoding.ASCII.GetBytes("some data".ToCharArray()); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address); request.AuthenticationLevel = AuthenticationLevel.MutualAuthRequested; request.ClientCertificates.Add(clientCertificate); request.Method = "POST"; request.ContentType = "application/json"; request.ContentLength = data.Length; Stream dataStream = request.GetRequestStream(); dataStream.Write(data, 0, data.Length); dataStream.Close(); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); string responseFromServer = reader.ReadToEnd(); reader.Close(); dataStream.Close(); response.Close();

Https freezes the game for one second

When I make a request to the server, all the game freezes for a few seconds, I think that the game is waiting for a server response, there is a way to not wait for the server's response? This is my code using UnityEngine; using System.IO; using System.Net; using System.Text; using System.Net.Security; using System.Security.Cryptography.X509Certificates; public class Request : MonoBehaviour { public void RequestFunction() { string output = RequestServer("page"); Debug.Log(output); } public string RequestServer(string page) { string output = ""; try { ServicePointManager.ServerCertificateValidationCallback = Validator; string data; // Create a request using a URL that can receive a post. WebRequest request = WebRequest.Create("https://www.mys_ite_web/" + page); // If required by the server, set the credentials. request.Credentials = CredentialCache.DefaultCredentials; // Set the Method property of the request to POST. request.Method = "POST"; // Create POST data and convert it to a byte array. string postData = "data="; byte[] byteArray = Encoding.UTF8.GetBytes(postData); // Set the ContentType property of the WebRequest. request.ContentType = "application/x-www-form-urlencoded"; // Set the ContentLength property of the WebRequest. request.ContentLength = byteArray.Length; // Get the request stream. Stream dataStream = request.GetRequestStream (); // Write the data to the request stream. dataStream.Write (byteArray, 0, byteArray.Length); dataStream.Close(); // Get the response. WebResponse response = request.GetResponse(); // Display the status. //Console.WriteLine(((HttpWebResponse)response).StatusDescription); // Get the stream containing content returned by the server. dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Display the content. //Console.WriteLine(responseFromServer); data=responseFromServer; // Clean up the streams. reader.Close(); dataStream.Close(); response.Close(); output = data; } catch(System.Exception e) { Debug.Log(e); } return output; } public static bool Validator (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } }

WebRequest.BeginGetRequestStream fails on iOS using IPv6 DNS64/NAT64

Apple has recently made it a requirement for all apps to support IPv6 DNS64/NAT64 and I've been working to comply with this mandate. I followed Apple's directions for setting up a DNS64/NAT64 network [here][1] (scroll down to Test for IPv6 DNS64/NAT64 Compatibility). Unfortunately when I test our app on that network, I get an exception: Login Failure received from server, error: Error: NameResolutionFailure stack Trace: at System.Net.HttpWebRequest.SetWriteStreamError(WebExceptionStatus status, System.Exception exc) Based on this it appears that DNS name resolution is failing. I've tried this on an IPv4 network, and it worked without error. The only low(-ish) level networking API I'm using is HttpWebRequest.BeginGetRequestStream, and I'm using that because I need to use the HTTP Verb "PUT" to connect with one of our REST services. I'm hoping there's simply a configuration I need to set up for HttpWebRequest, as the alternative seems to be writing a lot of custom code to handle DNS64/NAT64 networks. I've spent some time with the HttpWebRequest documentation without finding anything that seems to fit. Does anyone have a suggestion or a solution for how I might resolve this issue? [1]: https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html

Internet Connection Check using 204 HTTPStatusCode

I've been working on an Internet Connection Checker... I've tried many things, from pinging to WebRequests, from RESTful APIs to socket beacons. The one thing I found most reliable and performatic, considering Unity restrictions, was to make a WebRequest to a 'no content' web page. Such as Google's 204 Generator. This will return a HttpWebResponse with the 'No Content' HttpStatusCode, which is labeled as number 204. This response has a length of 0 bytes, which means the only data that would be downloaded is the Header of the response. Not only that, but since the page will return a fixed status code, you can check if the user is trapped inside a Walled Garden. Although I didn't find any downsides on using this, I would like a second (and more) opinion on the topic. For instance, would this method be suited for constant streaming games? Such as MOBAs or real time multiplayer games? Is the overhead of a WebRequest plus the header from the WebResponse large enough for it to be not performatic data wise? Is this a reliable way to check for internet connection? Are there any problems worth mentioning? Have you guys ever tried this on a large scale project? Thank you! Ps.: Below is a simplified version of what I mean. public enum ConnectionStatus { ERROR, NO_DNS_CONNECTION, WALLED_GARDEN, CONNECTED } public static class ConnectionChecker { private static Uri google204 = new Uri("http://clients3.google.com/generate_204"); private static Thread checkerThread = null; private static bool threadIsRunning = false; private static bool threadShouldStop = false; public static ConnectionStatus Status { get; private set; } public static void StartConnectionCheck () { if (threadIsRunning && !threadShouldStop) return; if (checkerThread == null) checkerThread = new Thread (CheckConnection); checkerThread.Start (); } public static void StopConnectionCheck () { threadShouldStop = true; } private static void CheckConnection () { threadIsRunning = true; while (!threadShouldStop) { WebRequest request; HttpWebResponse response; try { request = WebRequest.Create (google204); response = (HttpWebResponse) request.GetResponse(); } catch (WebException webException) { Status = ConnectionStatus.NO_DNS_CONNECTION; continue; } catch (Exception e) { Status = ConnectionStatus.ERROR; continue; } if (response.StatusCode == HttpStatusCode.NoContent) Status = ConnectionStatus.CONNECTED; else Status = ConnectionStatus.WALLED_GARDEN; Thread.Sleep(1000); threadShouldStop = threadShouldStop || ThreadShouldStop(); } threadIsRunning = false; threadShouldStop = false; } private static bool ThreadShouldStop () { return Thread.CurrentThread.ThreadState == ThreadState.StopRequested || Thread.CurrentThread.ThreadState == ThreadState.SuspendRequested || Thread.CurrentThread.ThreadState == ThreadState.AbortRequested; } }

HttpWebRequest Async not working on Android

The following simple code wants to download an asset bundle asynchronously from a given URL: private void GetWebContent(String _url) { Debug.Log("Creating webrequest with URL = " + _url); _request = WebRequest.Create(_url); IAsyncResult responseAsyncResult = _request.BeginGetResponse(ResponseCallbackWebRequest, null); } private void ResponseCallbackWebRequest(IAsyncResult state) { Debug.Log("ResponseCallbackWebRequest webrequest with URL = " + _url + "\nstate = " + state.ToString()); // This is the last print that I get in Android WebResponse response = _request.EndGetResponse(state); Debug.Log("A"); // this line is never printed out long contentLength = response.ContentLength; if (contentLength == -1) { _error = "Could not get a response from " + url; Debug.Log(_error); } else { Debug.Log("Content Length is " + contentLength); } //... extra stuff here } I tried both my real asset bundle URL and something fake like 'http://www.google.com' and the result is pretty strange: the code behaves as expected under my Mac and silently fails under Android (no crashes, and the last line printed is the first Log from ResponseCallbackWebRequest). Is there anything terribly obvious that I'm missing?

Trying to use PATCH on a UnityWebRequest on Android and getting 'Unsupported Protocol'

Hi Really hope someone can assist, we are using Azure Mobile App Service and everything works fine in the editor and on IOS, we only have a problem on Android when trying to update an existing record. According to the Azure resource documentation you need to use Patch PATCH /tables/tablename/:id Update an existing record in the table When testing on an Android device it does not even try to send the web request it simply returns error: "Unsupported Protocol" The research shows that there are workaround solution but I have not found anything relevant to Unity. I did a search on the forum for HttpMethod.Patch but could not find a single article. Really having some trouble understanding how to resolve the issue and if there is a way to resolve it in Unity. Any help would be greatly appreciated. Thanks in advance.

GET image over HTTPS with unvalidated SSL certificate and authenication

I have a Raspberry Pi server where if I request GET `https://192.168.1.2/stream`, the server will ask for authentication, then provide a snapshot image of the webcam. I use `HttpWebRequest` for authentication and to allow all SSL certificates (also, there's `HttpWebResponse` which pairs with it), but `UnityWebRequest` is good at requesting an image. How would I combine the both into one request? Should I use `HttpWebRequest` or `UnityWebRequest`? (I don't use `WWW` and `WWWForm` for inability to ignore SSL errors, or allow all SSL certificates). In one request, I need to: - Ignore SSL errors, or accept all SSL certificates - Authenticate my identity with username and password - Receive an image texture I'm basically looking for the '*__One Class to Rule Them All__*' Thank you! using UnityEngine; // Main stuff using UnityEngine.UI; // For 'urlInput' using UnityEngine.Networking; // For 'UnityWebRequest' using System.Collections; // Main stuff using System.Net; // Main Network library, most important using System.Net.Security; // For 'SslPolicyErrors' using System.Security.Cryptography.X509Certificates; // For building the trusted certificates list public class Stream_HTTPS : MonoBehaviour { public InputField urlInput; // Format: 0.0.0.0 private string url; public float GetRate = 0.15f; private float nextGet = 0; IEnumerator GetTexture() { url = urlInput.text; Renderer renderer = GetComponent(); ServicePointManager.ServerCertificateValidationCallback = TrustCertificate; // =============== HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://" + url + "/stream"); request.ContentType = "image/jpg"; request.PreAuthenticate = true; request.Credentials = new NetworkCredential ("Robot","password123"); request.Method = "GET"; // ^^^ // Combine // vvv UnityWebRequest www = UnityWebRequest.GetTexture ("http://" + url + "/stream"); yield return www.Send(); renderer.material.mainTexture = ((DownloadHandlerTexture)www.downloadHandler).texture; // =============== } void Update() { if (Time.time > nextGet) { StartCoroutine (GetTexture ()); nextGet = Time.time + GetRate; } } private static bool TrustCertificate(object sender, X509Certificate x509Certificate, X509Chain x509Chain, SslPolicyErrors sslPolicyErrors) { // Accept all Certificates return true; } }

Download 6 textures from the web, create a cubemap and set it as skybox in runtime

In my app I need teh user to be able to download already prepared 360 photos, cut into 6 pieces. After that, the cubemap must be made, and loaded as a skybox, so that the user could explore 360 degrees photos on his mobile device. I've been stuck here for almost a week, but nothing worked for different reasons, finally I've ended up with something that doesn't throw exceptions, but still it sets an emty gray skybox in the end. **Option 1: HttpWebRespone** public Material second; private Cubemap c; public void SetSkybox() { c = new Cubemap (1024, TextureFormat.RGB24, false); PhotoRequest("front", CubemapFace.PositiveZ); PhotoRequest ("back", CubemapFace.NegativeZ); PhotoRequest ("top", CubemapFace.PositiveY); PhotoRequest ("bottom", CubemapFace.NegativeY); PhotoRequest ("right", CubemapFace.PositiveX); PhotoRequest ("left", CubemapFace.NegativeX); c.Apply (); Material mat = new Material (second); mat.SetTexture ("_Cube", c); RenderSettings.skybox = mat; } private void PhotoRequest(string filename, CubemapFace cmf) { ServicePointManager.ServerCertificateValidationCallback = SkyboxAuthentication.Validator; // I know, it's bad string url = {path to the webfolder with the photos}; string completeURL = url + filename; var request = (HttpWebRequest)WebRequest.Create (completeURL); var response = (HttpWebResponse)request.GetResponse (); Stream dataStream = response.GetResponseStream (); BinaryReader reader = new BinaryReader (dataStream); byte[] responseFromServer = ReadAllBytes(reader); Texture2D tex = new Texture2D (1920, 1920); tex.LoadImage (responseFromServer); Color[] colors = tex.GetPixels (); c.SetPixels (colors, cmf); reader.Close (); response.Close (); } byte[] ReadAllBytes(BinaryReader rdr) { const int bufferSize = 1024; using (var ms = new MemoryStream()) { byte[] buffer = new byte[bufferSize]; int count; while ((count = rdr.Read (buffer, 0, buffer.Length)) != 0) { ms.Write (buffer, 0, count); } return ms.ToArray (); } } **Option 2: WWW** bool front = false; bool back = false; bool top = false; bool bottom = false; bool right = false; bool left = false; public void SecondSkybox() { c = new Cubemap (1024, TextureFormat.RGB24, false); StartCoroutine(PhotoRequest ("front", CubemapFace.PositiveZ)); StartCoroutine(PhotoRequest ("back", CubemapFace.NegativeZ)); StartCoroutine(PhotoRequest ("top", CubemapFace.PositiveY)); StartCoroutine(PhotoRequest ("bottom", CubemapFace.NegativeY)); StartCoroutine(PhotoRequest ("right", CubemapFace.PositiveX)); StartCoroutine(PhotoRequest ("left", CubemapFace.NegativeX)); StartCoroutine (DoLast ()); c.Apply (); Material mat = new Material (second); mat.SetTexture ("_Cube", c); RenderSettings.skybox = mat; } private IEnumerator PhotoRequest(string filename, CubemapFace cmf) { switch (filename) { case "front": front = true; break; case "back": back = true; break; case "top": top = true; break; case "bottom": bottom = true; break; case "right": right = true; break; case "left": left = true; break; } string url = {path to the webfolder with the photos}; WWW www = new WWW (url + filename); yield return www; Debug.Log (www.responseHeaders["STATUS"].ToString()); Color[] colors = www.texture.GetPixels(); c.SetPixels (colors, cmf); switch (filename) { case "front": front = false; break; case "back": back = false; break; case "top": top = false; break; case "bottom": bottom = false; break; case "right": right = false; break; case "left": left = false; break; } } private IEnumerator DoLast() { while (front || back || top || bottom || right || left) { yield return new WaitForSeconds (0.1f); } }

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

Hey guys, I'm trying to send an image taken from my webcam to a web API for processing. So I take a screenshot and store it in a Texture2D variable, then convert that to a byte[] by calling EncodeToPNG(). What kind of ContentType should I set for this? None of the ones I've tried seem to work. This is my HttpWebRequest code: myWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:64050/api/ZXing/BeginDecode"); myWebRequest.Method = "POST"; //Set ContentType here myWebRequest.ContentLength = bytes.Length; Stream dataStream = myWebRequest.GetRequestStream(); dataStream.Write(bytes, 0, bytes.Length); dataStream.Close(); response = myWebRequest.GetResponse(); Stream data = response.GetResponseStream(); StreamReader reader = new StreamReader(data); Debug.Log(reader.ReadToEnd()); Here's my camera code, just incase: camSnapshot = new Texture2D(camTex.width, camTex.height, TextureFormat.RGB24, false); camSnapshot.SetPixels(camTex.GetPixels()); camSnapshot.Apply(); bytes = camSnapshot.EncodeToPNG(); File.WriteAllBytes(Application.dataPath + "/../SavedScreen.png",bytes); Making and working with Web APIs are new to me so sorry if it's a dumb problem. Thanks.

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

Hey guys, I'm trying to send an image taken from my webcam to a web API for processing. So I take a screenshot and store it in a Texture2D variable, then convert that to a byte[] by calling EncodeToPNG(). What kind of ContentType should I set for this? None of the ones I've tried seem to work. This is my HttpWebRequest code: myWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:64050/api/ZXing/BeginDecode"); myWebRequest.Method = "POST"; //Set ContentType here myWebRequest.ContentLength = bytes.Length; Stream dataStream = myWebRequest.GetRequestStream(); dataStream.Write(bytes, 0, bytes.Length); dataStream.Close(); response = myWebRequest.GetResponse(); Stream data = response.GetResponseStream(); StreamReader reader = new StreamReader(data); Debug.Log(reader.ReadToEnd()); Here's my camera code, just incase: camSnapshot = new Texture2D(camTex.width, camTex.height, TextureFormat.RGB24, false); camSnapshot.SetPixels(camTex.GetPixels()); camSnapshot.Apply(); bytes = camSnapshot.EncodeToPNG(); File.WriteAllBytes(Application.dataPath + "/../SavedScreen.png",bytes); Making and working with Web APIs are new to me so sorry if it's a dumb problem. Thanks.

HTTPWebRequest.GetResponce not working on Android

I am trying to access data from IIS Server protected by NTLM protocol using HTTPWebRequest, which works fine on unity editor( windows ) but fails in Android Mobile App. I am getting 401 Unauthorized Access error, but works fine in editor and getting the expected response. Please help me, Please let me know, if there is any alternative through which i can access the server which is protected(NTLM protocol, I need to provide the authentication) Server shall be accessed successfully every time through browser, both in Desktop and in Mobiles.
Viewing all 190 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>