Hi Tim,
I'm still having trouble here. After changing the windows .NET service-logon
from localsystem to administrator, my routine in the service could reach the
network-drives. So I was happy!
However, the next time I started the service, again I couldn't reach the
network drives. The service runs under the administrator account and I've
double checked this by writing the WindowsIdentity.name to the system-log.
When the routine tries to get the files from the network-directory
(IO.Directory.GetFiles(path)) [where path is X:\test - which is perfectly
accessible when logging on as an administrator - X: mapped to \\server\c],
the catched error-message is: 'Could not find part of the path: "X:\test".
Even when I map X to a path on the local machine, I get the same error.
When I run this EXACT same routine from a stand-alone application (logging
on as administrator of course) everything works fine. I'm really puzzled
here. Am I missing something? Security issue? The routine is in a seperate
DLL that is called by the service / stand alone windows application.
Leo.
"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:if**************@cpmsftngxa07.phx.gbl...
Hello Leo,
Thanks for your reply. Now I'd like to share the following information
with you:
1. We are able to configure a service to log on as a specific account
instead of the default Local System account by the following steps:
a. Go to "Control Panel" -> "Administrative Tools" -> "Services".
b. Right click the service and choose "Properties".
c. Go to "Log On" panel, click "This account" and input corresponding user
name and password.
2. You can also call the API LogonUser() to log a user on to the local
computer:
LogonUser
http://msdn.microsoft.com/library/de...us/security/se curity/logonuser.asp
3. Since Hummingbird software (NFS) is a third-party tool, I suggest that
you can also contact the software vendor and see if there is any APIs
exposed for you to dynamically map a UNIX-share in your
application/service.
Hope this helps.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.