title: Copying a file to a network share which I don't have access to
body: <p>This is an extension of <a href="https://stackoverflow.com/questions/295538/how-to-provide-user-name-and-password-when-connecting-to-a-network-share">this</a> question</p>
  
  <p>I am trying to copy a file from my local user's temp folder to a remote file share.
  I do not have access to the remote file share, so I have to impersonate a user who does.</p>
  
  <p>Now, I can successfully read a file from the remote server and copy it locally, however I cannot write a local file to the share, since it gives me the error:</p>
  
  <blockquote>
    <p>Access denied for the LOCAL file </p>
  </blockquote>
  
  <p>(as I am now impersonating another user).</p>
  
  <p>If you need some code I can post it.</p>