Hi igg,
Thank you for posting in the community!
Based on my understanding, you can use directory to access the local drive,
but when you access a network drive, it failed.
================================
I agree with Pete that this problem may due to security permission.
When you use your code, which exception expression it shows? Please use
try...catch to show the error message for us.
In MSDN you can see that Directory.SetCurrentDirectory need
FileIOPermissionAccess.Write permission, while Directory.CreateDirectory
needs FileIOPermissionAccess.Read and FileIOPermissionAccess.Write
permission.
You may check the permission for your network drive.
===============================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.