Open file should allways hit the server and get a latest version

dprasad
dprasad used Ask the Experts™
on
When user opens a downloaded file, It should allways hit the server and get the latest file from the server. File what ever we downloaded from server should not open if the file not present in server of the client machine does not have internet explorer.

Please suggest me on this and how can i proceed further.

Thanks in advance,
Mateti
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What you need to do is to create a page which will serve/handle the download requests.
e.g. Page1.aspx will have a link like
<a href="DownloadFile.aspx?fileID=23" target="_blank">Download File 1</a>

The DownloadFile.aspx will handle the request and send the file to client browser.
It will process as below:
1) On Page load check the browser, if its IE then process next step. To detect the browser visit http://forums.asp.net/p/1026140/1398836.aspx
2) Now get the value from the querystring FileID, which is 23, get the file name/path and use TransmitFile class of .net framework. To know more about the TransmitFile visit http://weblogs.asp.net/dmiyamasu/archive/2008/02/25/save-server-memory-with-response-transmitfile.aspx

Author

Commented:
No my reqyirement is completly different. Already file get downloaded in to my system. When I opens the file from mu client system, it should contact the server and should get the latest file from server. If the server is down or my internet is down, then my file should not get open. Please provide some inputs.
In that case you can create a small software (e.g. Downloader.exe) which will be downloaded to the client system  instead of the complete setup at the first hit.
This software (upon execution) will call the server database and check the status of updates and will download the real software (e.g. MyCompanySoftwareSetup.exe) accordingly.

Now the question comes that how will you create a standard custom software which will be used for all downloads.

1) Create a software/windows application which will read the config file from the same location and call the server database with the software name (MyCompanySoftwareSetup.exe) provided in the config file.

2) Do further process in this software.

3) Give public uses this software with different software name in the config file.

You may need to create this Downloader.exe as an self-extract-executable.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial