Hello,
I have an ASP.NET web application which runs in an IIS app pool that
runs as the Network Service account. During initialization, this
application mounts a remote UNC using a username and password. It does
so using the Win32 API's WNetAddConnection2 function.
When running on Windows Server 2003, this works great. The application
is able to mount the UNC and then use it without any problems.
When I try running the app under Windows Server 2008, the application
is unable to mount the drive, and gets a Windows error code 1312, "A
specified logon session does not exist. It may already have been
terminated." This is the error I would expect to get if I was running
the application under Local System, since that account doesn't seem to
be allowed to access the network at all, but not Network Service.
If I change the app pool to run as a created user account, it works
fine.
So, my question is, was there a change in Windows Server 2008 from
2003 that makes it so the Network Service account is no longer able to
mount UNCs in this fashion? Is there anything I can do to allow
Network Service to be able to do so, or do I need to run the app under
a created user account instead?
Thanks!
--Steve
|