V
Vijayakrishna Pondala
Hi,
I am using the following C# code to connect to and download information from
a URL. (The pages are on JBoss server and we are using NTLM authentication
to connect to the server).
----
string url = "http://internal.ourcompany.com:8010/Page1";
WebRequest wreq = WebRequest.Create(url);
//Assign the default logon creadentials.
wreq.Credentials = CredentialCache.DefaultCredentials;
wreq.Timeout = 1000;
//Get the web response stream
WebResponse wres = wreq.GetResponse();
----
For some users, this code throws an error saying "The remote server returned
an error: (401) Unauthorized". When the user directly accesses the URL using
IE, he is able to see the information correctly.
Could someone help me out what is causing this error?
Thanks in advance,
Vijaya Krishna P.
I am using the following C# code to connect to and download information from
a URL. (The pages are on JBoss server and we are using NTLM authentication
to connect to the server).
----
string url = "http://internal.ourcompany.com:8010/Page1";
WebRequest wreq = WebRequest.Create(url);
//Assign the default logon creadentials.
wreq.Credentials = CredentialCache.DefaultCredentials;
wreq.Timeout = 1000;
//Get the web response stream
WebResponse wres = wreq.GetResponse();
----
For some users, this code throws an error saying "The remote server returned
an error: (401) Unauthorized". When the user directly accesses the URL using
IE, he is able to see the information correctly.
Could someone help me out what is causing this error?
Thanks in advance,
Vijaya Krishna P.