Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 20, 2012 02:35 PM by lprete
Nov 15, 2012 09:08 PM|LINK
I have a little odd situation that needs some help from experts like you.
We are an internal webapp (within the company) that is set as Windows Authentication. The site captures the user perfectly.
Now, there is one feature that we validate some other websites' headers by using the anonymous user account. So the following codes don't seem to be working:
_response = null;
HttpWebRequest _request = (HttpWebRequest)WebRequest.Create(uri);
_request.Method = "GET";
_request.AllowAutoRedirect = true;
_request.Accept = "*/*";
_request.MaximumAutomaticRedirections = 4;
_request.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
The System.Net.CredentialCache.DefaultNetworkCredentials is using as the current logged in user account, not anonymous account that we would like. How do I provide the anonymous account in this case?
Added: The codes above works in my local machine but once I publish it in web server, it breaks....
Nov 20, 2012 02:35 PM|LINK
If you want the request to be anonymous there is no need set any credentials.