I'm installing the service as a remotemachine user in the same workgroup because the service running as localmachine user does not have rights to access a network location.
I have a desktop application that sets the network location in the service.But before allowing the user to set a specific network location in the service,i need to check if the UNC Path entered by the user is accessible by the service. How can i check it from the Desktop Application?
Currently i use the following code to do simple directory exists check from the Desktop Application,obviously this does not confirm whether the service has access to the folder.
DirectoryInfo info = new DirectoryInfo(uncpath);
if (info2.Exists)
{
return true;
}