See the InTheHand.Net.NetworkShare.AddConnection method. You can map a share to a local path and supply credentials. The local path can then be used with regular file functionality in System.IO. Then use CancelConnection once you've finished.
The local name you specify becomes a subfolder of the virtual "Network" folder making your local path something like:-
"\Network\MyShare\MyFile.txt"
Peter