I am using Windows Server 2000, not sure which SP.
The following line displays NT AUTHORITY\SYSTEM
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent.Name
)
Which I am assuming is the current user. Yes, I do know what happens
when I assume!
Thanks,
Jeff
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Dominick Baier [DevelopMentor] - 27 Dec 2005 22:23 GMT
Hi,
ok .-
the client identity is in Context.User
WindowsIdentity.GetCurrent() give you the account the process is running
under - this account is used for resource access when no impersonation is
enabled.
Any reason why you are running as SYSTEM?? This is generally not recommended
because this is a very high privileged account - this is also not the default
for ASP.NET under Windows 2000 -
i guess you made changes to the processModel element in machine.config.
You be able to access resources on remote machines, you have several options
a) configure your worker process to run under a specific account, this could
be a domain account or a local account, with a mirrored counterpart on the
remote machine
this will affect all applications on the server
b) you can set impersonation in web.config for a fixed identity using <identity
impersonate="true" username="xx" password="xx" /> - this will only affect
the current application
c) you can impersonate programmatically by using LogonUser / WindowsIdentiy.Impersonate
config vs. code
i would
a) lower the privileges of ASP.NET to the default (which is the ASPNET account)
- if possible
b) use programmatic impersonation when needed
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> I am using Windows Server 2000, not sure which SP.
>
[quoted text clipped - 11 lines]
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.co
Dominick Baier [DevelopMentor] - 27 Dec 2005 23:06 GMT
Oh - i forgot another option - upgrade to windows 2003 - IIS6 give you multiple
worker processes which can all have distinct identities -
that's the feature you really need.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> I am using Windows Server 2000, not sure which SP.
>
[quoted text clipped - 11 lines]
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.co
Jeff - 28 Dec 2005 17:03 GMT
Dominick,
That was great thanks. I added the userName password section to the
identity tag, switched to using the Context to find the user and now I
can set permissions once. Perfect!
I would love to upgrade to 2003, but that is out of my hands.
Thanks again Dominick!!
Jeff
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com