title: Getting the default credentials?
body: <p>I have page <code>A.aspx</code> in my domain</p>
  
  <p>this page (in its c# codes)  makes a request to another page.(<code>B.aspx</code>). - which is in my domain also</p>
  
  <p>the whole site is in <strong>windows</strong> authentication</p>
  
  <pre><code>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;
  </code></pre>
  
  <p>Im using impersonation in my web site to a specific account.</p>
  
  <p>the account is being transferred by the statement : </p>
  
  <pre><code> loHttp.UseDefaultCredentials = true;
  </code></pre>
  
  <p>all is fine.....</p>
  
  <p>However, I want to see those credentials ( I need their "get")</p>
  
  <p>I know that the current thread account(being affected by impersonation)is given by : </p>
  
  <pre><code>WindowsIdentity.GetCurrent().Name
  </code></pre>
  
  <p>but I want to see the values that in the <strong>UseDefaultCredentials</strong> !
  something like </p>
  
  <pre><code>DefaultCredentials.getCurrent.username
  DefaultCredentials.getCurrent.password...
  </code></pre>
  
  <p>how can I do that ?</p>