This question is related to my previous question.
I have published a web service application (C# built in VS2010) to a desktop with IIS 6.0 win7.
The web service has been hosted successfully.
Now I can install the application on my laptop by accessing the URL
http://myDesktopName.domain.com/MyApp/MyAppSetup.msi
pointing to a physical location in desktop
E:\myPath\myApp\myAppService.svc
Now, in my application, I need to download a .dat file from my desktop to my local laptop by visiting the URL.
"http://myDesktopName.domain.com/MyApp/download.ashx?cmd=download&type=db&name=myDatasbase.dat"
But, the downloaded file size is not correct. Sometimes, it is 0. Sometimes, it is 9KB or 64KB. But, the original size s 4,000 KB.
The file is binary and is not readable in any text editor.
If I download the file from IE by typing the URL
http://myDesktopName.domain.com/MyApp/download.ashx?cmd=download&type=db&name=myDatasbase.dat
in address bar, the file can be downloaded correctly.
Why the file cannot be downloaded correctly from my application ?
thanks