In order to get the credentials of the user you will have to setup IIS for
your site as follows:
1. Disable anonymous access to you site in IIS.
2. Enable Windows Integrated Authentication.
In ASP .Net you will need to add the following to web.config:
<identity impersonate="true" />
In your code you do the following:
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
This will create a WindowsPrincipal with the user that is currently logged
into the domain. If you allow anonymous access or do not impersonate, the
WindowsPrincipal will be for the account used by ASP .Net. That will either
be ASPNET or NETWORK SERVICE.
Chris Rolon
> Hi,
>
[quoted text clipped - 19 lines]
> Any suggestions would be appreciated. Thanks,
> -Joe
Joe Rigley - 28 Jan 2005 19:20 GMT
Chris,
Excellent info! Just the kind of help I was hoping for! I greatly
appreciate your time helping me with this. I will give it shot next week
and see how it goes.
Much obliged,
-Joe
> In order to get the credentials of the user you will have to setup IIS for
> your site as follows:
[quoted text clipped - 41 lines]
> > Any suggestions would be appreciated. Thanks,
> > -Joe