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.


I will explain what I need to do and someone may tell me the proper set up
for this.

I have an ASP.NET intranet that maintains its own user database where users
log in through a form. I would like to streamline the login process so that
users do not have to log in manually to the Intranet. If they are logged in
to the domain and click on the Intranet's url, they are logged in the
Intranet automatically. The Intranet app knows who they are and
authenticate them behind the scene. My idea is that the Window's username
is synced with the Intranet username. Somehow I want my asp.net to pull out
the username from Windows and if it exists in the Intranet database, log in
the user. The Intranet website runs under a domain user which has rights to
certain documents folders for reading and writing purposes. That user is
the anonymous user under which the site runs. If I disable anonymous
security, then the Intranet website will run under which user? The logged
in user? The site needs to run under a single user no matter who's logged
in so that the web app has rights to certain folders locally.
Do I enable impersonation? What's the proper set up for this? LDAP?

TIA

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
>>.
>>
.



Relevant Pages

  • Re: How to
    ... Windows NT 4.0 ... > Users will be prompted for a username and password (by removing "Allow ... but only those users will appropriate NTFS permissions will ... if this is an intranet, ...
    (microsoft.public.inetserver.iis.security)
  • Re: How to get current logged in Windows username?
    ... intergrated Windows security used then I have to maintain all kinds of ntfs ... John Dalberg ... >>browser and use the username in my app. ... >>John Dalberg ...
    (microsoft.public.dotnet.framework.aspnet)
  • =?iso-8859-1?q?[Solved]_Sicherheitsmeldung_beim_=F6ffnen_von_z=2EB=2E_Zip-Dateien_auf_ei
    ... Windows XP Pro Sp1 / IE7. ... Ich finde das sowas von irritierend (Internet Explorer? ... Intranet will. ...
    (microsoft.public.de.german.windowsxp.sonstiges)
  • Re: URGENT - Very Puzzled - IIS Authentication
    ... Juan T. Llibre, asp.net MVP ... instruct your users to go to http://sguk-web1 to enter the intranet. ... I have just deployed our shiny new ASP.NET 2 Intranet app and want to use Integrated windows ... authentication at IIS level with "windows" authentication in web.config. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Suitability of FP
    ... For an Intranet w/ the collaborative features you want take a look at Windows SharePoint Server ... | ability to only give editor rights to certain people for certain areas) ...
    (microsoft.public.frontpage.client)

Loading