copy file through a vpn connection?

BGM

Member
Joined
Dec 4, 2011
Messages
18
Location
Kansas City
Programming Experience
3-5
Mr. John, I need to copy the file using domain credentials. We are connecting from a remote computer to our AD domain server through a vpn connection and copying a file from the local computer to a folder on that domain server. There are many folders there, one for each remote computer that we have, and each folder has security settings to allow only a particular user to enter. I need to add this to my io copy file process.

Would I need to use "impersonate" for that?
 
Thread split, unrelated question.
 
Sorry; didn't realize I was changing topic...
Anyway, now that we are on a new thread,

Mr. John, I need to copy the file using domain credentials. We are connecting from a remote computer to our AD domain server through a vpn connection and copying a file from the local computer to a folder on that domain server. There are many folders there, one for each remote computer that we have, and each folder has security settings to allow only a particular user to enter. I need to add this to my io copy file process.

Would I need to use "impersonate" for that? I have found this too: Thread.CurrentPrincipal.Identity.Name
What should I look at?
 
I have never used VPN, but I know the domain login can be configured for the VPN network connection. Once connected client can operate as if it was a normal private network. The only difference would be the transfer speed, which would be far slower than actual private networks that normally operates at 100mbit or 1gbit. So I would say no, if your VPN is configured correctly nothing in particular is required code-wise.
 
On our system making the vpn connection does not authenticate with the server itself; it only authenticates with the router (it's a super-router). Once the router has accepted the connection, I need to log into the windows server, but we have set the router and the server to use the same login name and login password, and it is ALWAYS different than anything on the local computer. I had worked up an impersonation class myself, that is quite similar to the one you gave me a link for; but I abandoned it when I realized I needed local login account to go with it.

Is there another way to do this without mapping the drive? Mapping the drive works perfectly, but it isn't as invisible as I like.
 
Back
Top