DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 23 Jul 2007 07:34:03 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.security        back       

Thread Index
  1    Herb am
          2    Dominick Baier
                 3    Herb am
                        4    Dominick Baier
                        5    Herb am
                               6    Dominick Baier


How to find Current User Name   
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?
Date:Mon, 23 Jul 2007 07:34:03 -0700   Author:  

Re: How to find Current User Name   
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?
> 
Date:Mon, 23 Jul 2007 15:02:21 +0000 (UTC)   Author:  

Re: How to find Current User Name   
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?
> > 
> 
> 
> 
Date:Mon, 23 Jul 2007 08:18:04 -0700   Author:  

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?
>>> 
Date:Mon, 23 Jul 2007 15:58:14 +0000 (UTC)   Author:  

Re: How to find Current User Name   
oops! it's always the simple things, isn't it? Incidentally, 
Me.User.Identity.Name also works. Is there a preferred method?

"Dominick Baier" wrote:


> 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?
> >>> 
> 
> 
> 
Date:Mon, 23 Jul 2007 10:16:00 -0700   Author:  

Re: How to find Current User Name   
Me implies that you are on a page - Context works everywhere...
-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)


> oops! it's always the simple things, isn't it? Incidentally,
> Me.User.Identity.Name also works. Is there a preferred method?
> 
> "Dominick Baier" wrote:
> 
>> 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?
>>>>> 
Date:Mon, 23 Jul 2007 17:22:26 +0000 (UTC)   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us