title: Open a shared file under another user and domain?
body: <p>I have a C# console application that needs to read a shared file on a machine in another domain.
  When the application tries to access the file an exception occurs as the local user does not have permission to access the shared resource.</p>
  
  <p>Currently I overcome this problem manually by open the shared folder from the run and put the username and password into the windows authentication dialog then run the application.</p>
  
  <p>How can I do it programmatically?</p>