Click here to Skip to main content
13,548,686 members
Rate this:
Please Sign up or sign in to vote.
See more:

Actually i m working on application which copy a folder from my pc to (another server)(both on network), for that i have to manually access that pc by passsing login credentials. is there any way to write code in c# (v 2.0) by passing network credential and when i run it should be auto access and copy folders on that server.

kindly suggest.
Posted 31-Jan-13 2:10am
Updated 31-Jan-13 2:11am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can create a shared folder on the server and apply the read-write permissions to your windows account.[^]

Edit - 4 Feb-13
Once you create shared folder on another machine. You can using C# File classes to copy the files\folders from the application.[^]
SDAP_INDIA 2-Feb-13 2:15am
to alternate solution... but i have to do it as i want.
any script/command something else
aspnet_regiis -i 4-Feb-13 3:45am
updated my answer..
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can use impersonation for this. You can define it in the config file or you can add that in the code whatever you like.[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180515.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100