Re: How to get current logged in Windows username?



On Wed, 6 Apr 2005 16:14:41 -0700, Eltoon Wang wrote:

> Hi John,
>
> If you use Windows authentication and deny anonymous
> access, you can use HttpContext.Current.User.Identity.Name
> to get domain log on user name.



How can you do something similar with Form authentication?

John Dalberg



>>-----Original Message-----
>>
>>
>>I want to automate the process of logging into an
> intranet. I want to pull
>>out the username of the Windows user logged into the
> machine running the
>>browser and use the username in my app. How can I get the
> logged in
>>username?
>>
>>Do I have to disable the anonymous access in IIS? I
> rather not because the
>>site is running under a certain domain user which has
> access to certain
>>folder and network shares and the site needs thsi access
> for reading and
>>writing files.
>>
>>--
>>John Dalberg
>>.
>>


--

John Dalberg
.



Relevant Pages

  • Re: MOSS Forms based authentication question
    ... John F. Holliday wrote: ... w> match up with the ones using windows authentication. ... w> Does anyone know if this is by design or is there a way to have AD ...
    (microsoft.public.sharepoint.portalserver)
  • Re: IIS, SQL DMZ question
    ... John ... > According to Microsoft, I should be using Windows authentication. ... >> Are you using Standard Security or Windows Authentication for the ...
    (microsoft.public.sqlserver.security)
  • How to get current logged in Windows username?
    ... If you use Windows authentication and deny anonymous ... to get domain log on user name. ... >browser and use the username in my app. ... >folder and network shares and the site needs thsi access ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Normalize table
    ... john wrote: ... (Username, ApplicationName) ... DBEngine.Execute strSQL, dbFailOnError ... and you can grab the Application Name by getting the ...
    (comp.databases.ms-access)
  • Re: If postal doesnt stop....
    ... when I see an email or username I never seen before I always get suspicious ... unimaginable depth, about John from Cincinnati again. ...
    (rec.music.artists.springsteen)