FileWebRequest.Credentials work around?

  • Thread starter Thread starter Tom Cole
  • Start date Start date
T

Tom Cole

Good Morning,

I've been trying to use FileWebRequest to copy data over
the network using
file share (\\server\share), and it works pretty well
except when the folder
requires authentication to access. When I try to copy to
these folders
windows will give me an access denied message. However,
if I try to access
the share with IE, it asks me to log in, after I do that
I can use
FileWebRequest without a problem.

Now I know from the documentation that the
FileWebRequest.Credentials is not
implemented yet, but is there a work around on this? Can
I programmatically
(in .NET, WinAPI, or something else) log into that share
with my window
session before I use the FileWebRequest?

Thanks
 
Nevermind I Found it.

Appearantly I can use the Shell Function to execute a Net
Use logon to pre-authenticate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top