Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

WebException : Send Failure. Error Writing Headers

$
0
0

I am trying to read some data from a local https server using HttpClient. The code works OK for HTTP. The Exception which is thrown with HTTPS is

System.Net.WebException : Send Failure. Error Writing Headers

        var client = new System.Net.Http.HttpClient();
        client.BaseAddress = new Uri("https://192.168.12.15/");
        var response = await client.GetAsync("json.php");
        var retdata = response.Content.ReadAsStringAsync ().Result;

I don't want to jump the gun here, but I happen to know that the certificate offered by the web server may fail validity checks because it has been self signed. If it is related to this is it possible to add a callback to allow prevent the certificate being rejected. When I try to access the URL from Safari the page is served, but only after I have accepted certificate warnings.

However.....the problem may not even be related to the certificate, can anyone comment?

Thanks.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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