This is a re-hash of a previous posting, with greater specificity.
I get the following error:
The code that causes the error:
"sack_destination" is a string that equates to "z:\mer". This is a mapped drive, a network share.
The code is contained in a Console Application, which is launched from a Windows Service application using System.Diagnostics.Process.Start.
I have tried running the service under the LocalSystem account, and as a local user account with Administrative + "run as service" privileges. The same error in each case.
I also tried running the service under NetworkResource account, but the service failed to start, with no specific error message, so I'm not sure what the problem is there.
The error does NOT occur when I manually run or debug the Console application.
What privileges are needed in order for an application spawned by a service to access network resources? Can those privileges be granted programmatically? In other words, can the service launch the process with specific credentials? If so, how (code snippet)?
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
I get the following error:
An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll
Additional information: Could not find a part of the path "z:\".
The code that causes the error:
Code:
if (!Directory.Exists(sack_destination + tape_name))
{
Directory.CreateDirectory(sack_destination + tape_name);
}
"sack_destination" is a string that equates to "z:\mer". This is a mapped drive, a network share.
The code is contained in a Console Application, which is launched from a Windows Service application using System.Diagnostics.Process.Start.
I have tried running the service under the LocalSystem account, and as a local user account with Administrative + "run as service" privileges. The same error in each case.
I also tried running the service under NetworkResource account, but the service failed to start, with no specific error message, so I'm not sure what the problem is there.
The error does NOT occur when I manually run or debug the Console application.
What privileges are needed in order for an application spawned by a service to access network resources? Can those privileges be granted programmatically? In other words, can the service launch the process with specific credentials? If so, how (code snippet)?
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting