Re: How to get current logged in Windows username?
- From: John Dalberg <john_dd@xxxxxxxxxxx>
- Date: Thu, 7 Apr 2005 08:46:06 -0700
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
>>.
>>
.
- References:
- How to get current logged in Windows username?
- From: John Dalberg
- How to get current logged in Windows username?
- From: Eltoon Wang
- How to get current logged in Windows username?
- Prev by Date: Re: SmtpMail Problem
- Next by Date: Re: recover source from DLL?
- Previous by thread: How to get current logged in Windows username?
- Next by thread: Re: How to get current logged in Windows username?
- Index(es):
Relevant Pages
|
Loading