I have an A.aspx page in my domain
this page (in its C # codes) makes a request to another page. ( B.aspx ). - which is also in my domain
whole site is in windows authentication
HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create("http://mydom.com/b.aspx"); loHttp.UseDefaultCredentials = true; loHttp.Timeout = 100000; HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse(); Encoding enc = Encoding.GetEncoding("UTF-8"); // Windows default Code Page StreamReader loResponseStream = new StreamReader(loWebResponse.GetResponseStream(), enc); string lcHtml = loResponseStream.ReadToEnd(); loWebResponse.Close(); loResponseStream.Close(); return lcHtml;
Im using impersonation on my website for a specific account.
the account is transferred by the operator:
loHttp.UseDefaultCredentials = true;
everything is good.....
However, I want to see these credentials (I need to get them)
I know that the current thread account (affected by impersonation) is determined by:
WindowsIdentity.GetCurrent().Name
but I want to see the values that are in UseDefaultCredentials ! sort of
DefaultCredentials.getCurrent.username DefaultCredentials.getCurrent.password...
How can i do this?
source share