Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm building a Windows app and I'm stumped on a simple copy operation. Here is the scenerio:

 

I want to copy c:\temp\somefile.txt to \\remoteserver\c$\temp\somefile.txt

Now my local machine is on one domain and the remote server is on another domain. Typically when you use Windows Explorer to copy you get prompted for your remote domain credentials. No problem, I'm an admin on the remote domain.

 

I've tried:

fso.copyfile <- This doesn't allow for remote credentials

wmi <- Provides remote credentials however no UNC's

system.io.file.copy <- Uses local credentials

 

I would prefer to use system.io.file.copy. How do I provide remote credentials through my application?

Note: This is a Windows application NOT ASP.

Posted

Fixed my own problem.

 

I recently started running my copy operation in a new thread (copying files to several servers at a time). That is when the authentication started failing. I've implemented a "per thread" authentication and it is now working.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...