Click here to Skip to main content
15,915,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

Here iam Created on Zip file this file should be passed to another destination Server.Throgh Webservice how to pass this path to that Destination Server in asp.net with c#.

Give me suggestion regarding this.


Regards,

AnilKumar.D
Posted

1 solution

Passing the path to a a web service makes no sense unless this code runs on a local network, and the path corresponds to a well known file share. I've seen many people design apps and test them on one machine where they follow this philosophy only to see it crash and burn when deployed to a web server.

Effectively your options are to only use well known shares (and this opens up all sorts of security nightmares because you have to ensure that your web service has the right permissions for those shares), or to pass the ZIP file across as a series of bytes. If you do this, you may need to chunk the file so that it doesn't crash the service by exceeding the maximum upload limit. Also, as a general rule - when you are accepting files, you should never upload them directly to a central store. Instead, upload them to a staging area. Let a virus scanner check the file in the staging area, and only move it into your central store once it has been thoroughly checked.
 
Share this answer
 
Comments
Anil Honey 206 30-Apr-12 7:42am    
can u tell me how to convert zip file into byte array
Pete O'Hanlon 30-Apr-12 7:59am    
The easiest way is with File.ReadAllBytes.

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