Dominick, Let me see if I understand.
1. If you are running in IIS6, then by default your code is running as
"Network Service". I believe it is actaully gaining these rights through
the IIS_WPG group.
Network Service is the security context that DOTNET runs on a local machine.
Between machines it is anonymous in a workgroup so in effect no
authentication is passed, but within a domain environment rights are passed
through the machine account.
So.
Q1 - defining a virtural directory in IIS6 under the DOTNET application -
will run as Network Service if the virtural directory is on this server? -
This does work.. and BTW the code that is calling access to the virtural
directory is a server.mappath in the code. (Is this right?)
Q2. - if the same definition as above but the virtual directory is remote
(by doing this I have to put credentials in IIS6 to access the virtual
directory on server B) When are these credentials ever used? and if
therefore dotnet never looks at this virtual directory definition it
itherefore is trying to access the remote virtual directory as anonymous
(same as a http webpage?).
I guess if I throw IIS5 out of the picture and decide to make this work on
IIS6 I am still a little confused on the detail. ie. If I have two Win 2003
servers in a workgroup, one is running the IIS6 services other has a
directory required for R/W and shared as ServerB\Data? This is still
anonymous access by default even in IIS6? Does IIS6 have to be running on
both servers?
Thanks Dominick for any clarrification and your time.
Turbot
I think we're all getting a little confused here.
a) ASP.NET runs (by default) as Network Service, because that's the default
account configured for Web Application Pools in IIS 6.0. To set a different
account, open the IIS Manager, locate the Web App Pool hosting your web
application/web site, and enter a different user account.
b) Mapped drive letters are not going to work. Drive letters are mapped for
the logged on user only - not for any other account. So, if you logon and
map a drive letter, then Network Service is not going to see that drive
letter
c) IF you want to use a fixed identity to connect to the remote share, then:
i) create a user account, with the same name, on both machines. Set the
same password
ii) in IIS Manager, create a virtual directory that points to a UNC
share
iii) specify the credentials that you created in (i) as the credentials
to be used when connecting to the remote share
d) However, if you are forcing the user to authenticate, and wish the user's
credentials to flow through to the backend server, then you need to read
this document:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/weba
pp/iis/remstorg.mspx
Cheers
Ken
: Dominick, Let me see if I understand.
:
[quoted text clipped - 10 lines]
: Q1 - defining a virtural directory in IIS6 under the DOTNET application -
: will run as Network Service if the virtural directory is on this
erver? -
: This does work.. and BTW the code that is calling access to the virtural
: directory is a server.mappath in the code. (Is this right?)
[quoted text clipped - 71 lines]
: >>>>
: >>>> Turbot
TurboT - 01 Nov 2005 16:53 GMT
Ken thank you.. just a little more clarrification.
I have done exactly what you have mentioned. and in this document.
1. same local account and password on both machines.
2. same credentials for UNC in virtual directory definition
I am wondering if we are using the incorrect code to reference this
directory. I believe it is server.mappath in the code..??
>I think we're all getting a little confused here.
>
[quoted text clipped - 135 lines]
> : >>>>
> : >>>> Turbot