Author: starBUSYstar | Posted on: 3/22/2010 9:08:29 PM | Views : 436

Hi,
I have a page that generates WebRequest in order to post data. I am on a domain and am using windows auth. Currently, my app is able to impersonate me when ran locally on my box, but when other users try to access my page, the networkcredential passed to my function for WebRequest is not correct. 
I need to be able to impersonate the user and use their networkCredentials in order to set the WebRequest .credentials attribute.
In web.config
<authentication mode="Windows" />
<identity impersonate="true" />
In aspx.cs.Page_Load
((System.Security.Principal.WindowsIdentity)User.Identity).Impersonate();
And in my event handler for Submit
BrowserHelper bho = new BrowserHelper();
bool error;
//myProxy, postdata, and URL omitted
NetworkCredential creds = CredentialCache.DefaultCredentials.GetCredential(new Uri(myProxy), "NTLM");
//also tried: &n ...

Go to the complete details ...