c# - Local fixed disk cannot be accessed from service -


i'm experiencing following strange behaviour:

a c# service fails operations on local disk d: (e.g. check if directory exists), while console version wrapping same assembly, has no problem whatsoever. both running under same user account, member of local administrators group. when loggon on interactively, same user has no problems accessing drive d:\ using windows explorer.

inserting following diagnostic code:

        driveinfo[] drives = driveinfo.getdrives();         foreach (driveinfo drive in drives)         {             string label = drive.isready ? string.format(" - {0}", drive.volumelabel) : " - drive not ready";             string drivemessage = string.format("drive {0} - {1}{2}", drive.name, drive.drivetype, label);             eventlog.writeentry("nxg siteservice", drivemessage, eventlogentrytype.information);         } 

shows drive d: fixed disk, "not ready"?

can please explain me why fixed disk can "not ready" when accessed service?

the environment is: windows 2012 server, running on vmware esxi host v. 5.5.0

we found cause & solution: http://social.technet.microsoft.com/forums/windowsserver/en-us/179c72b2-2957-43a0-8798-472e907a6e55/access-denied-issue-with-server-2012-only-on-secondary-drive-not-c


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -