-
Problem with retrieveing windows username
Hi,
I'm atttempting to retrieve the Windows username from an
ASP page using the WindowsIdentity.GetCurrent() method. The object returns
but the username contained is 'NT AUTHORITY' as opposed to the correct
windows username.
Any ideas?
Iain
-
Re: Problem with retrieveing windows username
On Mon, 7 Jan 2002 12:02:19 -0000, "Iain Munro" <imunro@genre.com> wrote:
¤ Hi,
¤
¤ I'm atttempting to retrieve the Windows username from an
¤ ASP page using the WindowsIdentity.GetCurrent() method. The object returns
¤ but the username contained is 'NT AUTHORITY' as opposed to the correct
¤ windows username.
¤
I believe it is an impersonation issue that ASP does automatically but ASP.NET does not (by default)
when requested. See if the following helps/makes sense:
The Web server impersonates a client in one of two ways. Original ASP automatically impersonated the
client every time a request was made. ASP.NET does not do this by default, but you can turn it on in
the web.config file by setting the impersonation attribute to True. Alternatively, you can
impersonate the client programmatically by calling the function
System.Security.Principal.WindowsIdentity.GetCurrent().Impersonate.
Web.config settings for automatic impersonation.
<identity>
<impersonation enable="true" />
</identity>
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks