Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to programming in vb.net , i am in need of an online backup source code to backup folders from server to client using vb.net code, not ftp concept. i am using server ip instead.
Posted
Updated 16-Jan-12 21:59pm
v2
Comments
Prerak Patel 16-Jan-12 7:01am    
Upload where? Network location or web? If web, http or ftp?
feelgood2smile 16-Jan-12 8:42am    
upload to server i am not using ftp instead using ip address to upload and restore files and folders....ITS AN ONLINE BACK UP PROJECT to be developed using vb.net.

You have to move files from point A to Point B across a network or internet. Mr. Patel was asking how you plan to do that.

Local Network
If it is a Network Location then you can simply register as a user on the server and use a shared server folder ie //Server/MyFolder and use normal IO functions.

Server On The Web
If you are not connected to a server locally, you can access a completely shared public folder but so could everone else. In order to get around this, you need to log in to the computer you are moving files to and from.

The sytax for the folder is the same //ServerIP/Myfolder but you will need to pass the credentials. There is no easy way with the .net Framework to do this. You will need to use impersonation.

Here is the link I used for Impersonation http://kellyschronicles.wordpress.com/2008/10/10/impersonate-user-with-vb-net/[^]

Server On The Web alternative
The other way you can do this on a webserver that is much easier but not nearly as nice is to map a drive to the network shared folder which handles the authentication for you. You just map a drive letter like Drive z: to the address and your program can access drive Z

To Map a drive you right click on the My Computer icon and select Map Drive. You then select the drive letter you want to use, enter the server address and the login information.

Via FTP
There is a handy component for FTP that you can use in your vb app.

[Download]
This component is free. It is a little cumbersome to get started but ver effective. I use this to upload website information to from my programs.

Web Service
You can easily write web service even for use on your local network. This method is great for webbased external server especially if you want to intereact with the process from a program running on the server.

I think that pretty much covers the most common methods. once you pick one, it will be easier to get down to how the coding is performed.
 
Share this answer
 
Thank u jim,

but i am trying to develop a windows application in vb .net which uses a ip address to transfer files from one system to another, and saves it in the server.but when i try to take backup of folder, i dont find any solution to backup a folder on a whole. i searched internet but i couldnt find a code to transfer folder having files/subfolder from source to destination machine.

please provide me solution to transfer folders between server and client using vb .net code.
 
Share this answer
 
Ok.. There is no easy 1 command way to copy a direcory but you can certainly scan each directory and copy each file.

Here is a page with a solution to copy a whole directory. http://www.dreamincode.net/forums/topic/154022-how-to-simply-copy-a-directory-and-all-its-contents/[^]

As far as it being on a server, as long as you have access to the shared folder in which you will be copying to, you should be able to write to it just like you do your harddrive. If you need to athenticate with the server, it may be a little tougher and you can look at my prior comments to find links.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900