Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Every One

I developed a site using c# asp.net 2.0 , which is used for search the document name in the database and the related doument is available in
other server which has to be given a link for download for client.

Working fine at my development system , but not working when hosted .

Example:
let server A be database server
let server B be iis server
let server C be server wehre the physical socuments available

Note: all are in the same domain ,and the folder from which the to be accessed and download is a shared folder.

i hosted the the site in 'B' which search's the file in 'A' and a link to be given for downloading that file for the client from 'C'

But It is working fine if i host this site on server 'C' where the documents available.

Please Help
Thanx in advance
Posted
Updated 24-Apr-10 3:10am
v4

1 solution

This does not work because the clients do not have access to the server C. It works in development because your client is on the same LAN. What you need to do is to stream the file to client from the IIS server. Here is an example to do this in ASP.NET:

Response.WriteFile(@"\\C\documents\document.doc");


Of course, a full solution will be more complex as you need to put the MIME Type of the file in the header.

Here is another article that describes the process:

http://support.microsoft.com/kb/306654/[^]
 
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