G
Guest
This is gettin' me crazy!
I need to get and send data for the server, but i dont want to use anonymous
authentication.
It works fine with anonymous authentication, but when i try to use log and
pass... it crashes, or simply doesnt work.
Maybe it has something to do with IIS...but i dont know.
Ill post the code im using.
NetworkCredential NC= new NetworkCredential("Log","Pass");
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(downloadUrl);
req.Credentials=NC;
req.Method = "GET";
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
// Retrieve response stream
Stream respStream = resp.GetResponseStream();
I need to get and send data for the server, but i dont want to use anonymous
authentication.
It works fine with anonymous authentication, but when i try to use log and
pass... it crashes, or simply doesnt work.
Maybe it has something to do with IIS...but i dont know.
Ill post the code im using.
NetworkCredential NC= new NetworkCredential("Log","Pass");
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(downloadUrl);
req.Credentials=NC;
req.Method = "GET";
HttpWebResponse resp = (HttpWebResponse) req.GetResponse();
// Retrieve response stream
Stream respStream = resp.GetResponseStream();