title: VPN authentication in C#
body: <p>I have a VPN in my office. One machine has windows server 2003 installed. I am coding an app in C# to upload files from a machine connected to the server machine on a shared folder.</p>
  
  <p>The file transfer code has been written, but it throw Access denied exception when I run it.</p>
  
  <p>However when I open the shared folder using windows explorer and key in my username and password, then it works like a charm.</p>
  
  <p>I need to know why it's throwing this exception and what code should I write to automatically authenticate myself from the code without going to windows explorer and entering credentials there.</p>
  
  <p>Update --</p>
  
  <p>.net version is 2.0, I can upgrade if its necessary but I dont think its the issue.
  Iam running the application on the local machine.</p>