C# windows services cannot access network files and folders

  • Thread starter Thread starter Razor Works via .NET 247
  • Start date Start date
R

Razor Works via .NET 247

I have got a windows service installed through installutil in C#.I have change the login settings from localsystems todomain/user. The user can access the network resources with noproblems but if the windows services can't. Directory.Existreturns false, but true if I use a normal C# windows app.
 
Do you access network files by using mapped drives like
'N:\somefolder\myfile.txt'? If so, change to the UNC naming convention
'\\myserver\myshare\somefolder\myfile.txt'. Keep in mind that logon scripts
are not executed for windows services and even manually assigned drive
letters are not accessible in the context of a windows service.

Hope that helps,
Guido
 
Back
Top