I am working on a service that has special conditions if the two UNC paths given to it reside on the same volume. However I have yet to figure out a way of determining this since the C# DriveInfo class does not work with UNC paths.
EX:
\\server\path_a resides on drive A
\\server\path_b resides on drive B
Is there some way of telling that \\server\path_a and \\server\path_b do not reside on the same drive remotely?
Sure you can, but you will need to use PInvoke to call into a WinAPI interface located in the NetAPI32 library. For example:
Depending on your needs you can get the SHARE_INFO_2 struct for the shares by calling NetShareGetInfo, which will give you that info object for the share. Have a look at the struct here. The shi2_path property will give you the local path which contains the drive.
The MSDN documentation states the following about that property:
Please Note: You will need to have sufficient credentials to get the SHARE_INFO_2 object.
Then when you get both paths you can do something like (very rudimentary):