Capturing the Windows NT Username from IE 5.5+
From: Dennis Thornton (Dennis.Thornton@api-wi.com)
Date: 07/09/02
- Next message: tHE rOCK: "Web Service & Crypto API"
- Previous message: Vladimir Maysuradze: "Re: Separate Login site"
- Next in thread: Dennis Thornton: "Re: Capturing the Windows NT Username from IE 5.5+"
- Reply: Dennis Thornton: "Re: Capturing the Windows NT Username from IE 5.5+"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Dennis Thornton" <Dennis.Thornton@api-wi.com> Date: Tue, 9 Jul 2002 10:06:29 -0500
Using c#
The following code snippet displays the prompt for user credentials. I have
set internet explorer to automatic logon in the intranet zone. IIS virtual
directory is set to allow anonymous users.
How do I prevent the dialog from appearing?
private void Page_Load(object sender, System.EventArgs e)
{
Response.StatusCode = (int) HttpStatusCode.Unauthorized;
Response.AppendHeader("Server","Microsoft-IIS5.1");
Response.AppendHeader("WWW-Authenticate","Negotiate");
StringBuilder result = new StringBuilder();
for (int item = 0; item < Request.ServerVariables.Count ; item++ )
result.Append(Request.ServerVariables.Keys[item] + " = " +
Request.ServerVariables[item] + "\n");
outputTextBox.Text = result.ToString();
}
- Next message: tHE rOCK: "Web Service & Crypto API"
- Previous message: Vladimir Maysuradze: "Re: Separate Login site"
- Next in thread: Dennis Thornton: "Re: Capturing the Windows NT Username from IE 5.5+"
- Reply: Dennis Thornton: "Re: Capturing the Windows NT Username from IE 5.5+"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]