Thanks. I tried that and thought it was working.. but it only seems to work
when i'm on the same system as the webserver. When i go to another system
and browse to the web page i get a (401) unauthorized error message.
It's currently setup with
<identity impersonate="true" /> in web.config
IIS - Windows Authentication
myHttpWebRequest.Credentials = CredentialCache.DefaultCredentials
"richlm" <ri*****@h0tmai1.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
e.g. myHttpWebRequest.Credentials = CredentialCache.DefaultCredentials;
Look up System.Net on MSDN library for more info.
Richard.
"Jamie" <sp**********@nospam.com> wrote in message
news:ON**************@tk2msftngp13.phx.gbl...
I'm trying to create a HttpWebRequest object that uses the current
logged in users credentials. The site is using Windows Authentication, Anonymous
access is turned off.
Will the HttpWebRequest object use the current users credentials if i
use <identity impersonate="true" /> ? or do i have to set the Credentials
property of the web request? If i do, how do i set it to be the current
windows user logged into the application? I don't want to create a
NetworkCredential object where i would have to pass in the login and
password of the user.
Thanks,