Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 04, 2012 06:21 AM by sobinscott
Jun 30, 2010 12:21 PM|LINK
I configured my new IIS server and hosted an asp.net site.I have some dll files in my website's folder and the users do a download of these dll files at sometime.The problem is , the dll files can not be downloaded via a browser.The directory listing shows
all the dlls but when i click to download it, browser says "The page cannot be displayed".I
have added mime type in iis for dll files.
Thanks in advance for your reply
Jun 30, 2010 01:04 PM|LINK
Add the following code to your dowload button/link click in C# code.
FileInfo fileInfo = new FileInfo("filename_of_the_dll");
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileInfo.Name);
Response.ContentType = "application/octet-stream";
Please 'Mark as Answer' if this post helps you.
Jul 04, 2012 06:21 AM|LINK
When I added the application/octet-stream MIME type in iis issue was solved.