Re: How to find Current User Name
- From: Dominick Baier <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jul 2007 15:58:14 +0000 (UTC)
Then i guess you have'nt disabled anonymous auth on your intranet server (in IIS)...
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
No luck. This yields a blank string.
These are my three lines of code:
Response.Write(">" & Me.User.Identity.Name & "<<BR>")
Response.Write(">" & System.Security.Principal.WindowsIdentity.
GetCurrent().Name & "<<BR>")
Response.Write(">" & Context.User.Identity.Name & "<")
When run locally yields:
DOMAIN\USERNAME<When run on the Intranet yields:
DOMAIN\USERNAME<
DOMAIN\USERNAME<
<From
WEBSERVERNAME\ASPNET<
<
"Dominick Baier" wrote:
Use
Context.User.Identity.Name
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications
(http://www.microsoft.com/mspress/books/9989.asp)
When I run my ASP.NET application from my development PC,
Me.User.Identity.Name works. When I run it from my Intranet site, it
does not. Any suggestions?
.
- Prev by Date: Re: best practice for accessing a network share from IIS
- Next by Date: Re: How to find Current User Name
- Previous by thread: Re: How to find Current User Name
- Next by thread: Re: How to find Current User Name
- Index(es):
Relevant Pages
|