0
votes

I am downloading an .msp file from localhost

WebClient webClient = new WebClient();
webClient.DownloadFile("http://localhost/Installer.msp", @"d:\Installer.msp");

It is throwing exception : "The remote server returned an error: (404) Not Found."

I do not get this exception for other file types like *.msi etc. I have IIS V 7.5

I guess IIS does not allow particular file types like (*.msp) for download ? How to overcome this problem ?

1
check if the MIMEType for this is registered to be served in IIS 7. If the mime type is not registered,it shall not serve the file. - Furqan Hameedi

1 Answers

0
votes

Thanks Furqan. The porblem solved when I added the MIMEType for this particular extension in IIS 7. as File name extension -> .msp and MIME type -> as application/octet-stream