Re: How to find Current User Name



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<
DOMAIN\USERNAME<
DOMAIN\USERNAME<
When run on the Intranet yields:

<
WEBSERVERNAME\ASPNET<
<
From

"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?



.



Relevant Pages

  • Re: Protecting .NET assemblies (runtime)
    ... Dominick Baier ... Developing More Secure Microsoft ASP.NET 2.0 Applications ... mentions nothing about how to use it to protect assemblies. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Protecting .NET assemblies (runtime)
    ... Dominick Baier ... Developing More Secure Microsoft ASP.NET 2.0 Applications ... mentions nothing about how to use it to protect assemblies. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Win 2003 svr/ASP.NET 2.0 UNC share
    ... Dominick Baier ... Developing More Secure Microsoft ASP.NET 2.0 Applications ... Now I need to setup Kerberos between the web1 and fileserver web2. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Protecting .NET assemblies (runtime)
    ... Dominick Baier ... Developing More Secure Microsoft ASP.NET 2.0 Applications ... mentions nothing about how to use it to protect assemblies. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Protecting .NET assemblies (runtime)
    ... Dominick Baier ... Developing More Secure Microsoft ASP.NET 2.0 Applications ... mentions nothing about how to use it to protect assemblies. ...
    (microsoft.public.dotnet.framework.aspnet.security)