I use this:
WebClient mClient = new WebClient();
mClient.UseDefaultCredentials = false;
mClient.Credentials = new NetworkCredential("Name", "Password");
Uri mUrl = new System.Uri("https://server");
mClient.DownloadDataAsync(mUrl);
mClient.DownloadDataCompleted += MClient_DownloadDataCompleted;`
and I get an error in the header.
I do not understand that if I use the same code in a console application in Visual Studio, I get the expected result! But if I use this code in my Android app, I get an error in the header. I tried it on an emulator and with a device.
source
share