IIS 8.5 serving dll for download instead of executing

六眼飞鱼酱① 提交于 2019-12-11 04:47:53

问题


The Problem:

When I access a (32-bit) DLL via URL like http://localhost/somepath/some.dll?action IIS always thinks I want to download the file (with file size 0 byte) instead of executing the dll.

What I tried so far:

  • added an entry for this specific DLL in ISAPI- and CGI-Restrictions
  • enabled the "ISAPI-dll" Handler for *.dll with feature permissions read,script and execute.
  • IIS User / AppPool Identity have full access rights to the physcal location of the dll
  • App-Pool is running in classic mode and 32 bit applications are enabled
  • I deleted the MIME-Type Entry for *.dll

Still any browser prompts a download window. I'm running out of ideas now. I'm currently using IIS 8.5 on Windows Server 2012 R2.

The same application is running without troubles in IIS 5 on Windows 2000 SP4.

Any help or idea is appreciated!


回答1:


And as Windows 2000 was 32-bit and Windows Server 2012 R2 is 64-bit ( and as you said your DLL is 32-bit) I expect that your issue is maybe possibly linked to this issue.


Does your DLL has been registered on server side by using command regsvr32 <youdll> (run that command from the windows directory) ?

  • You may also try to set the MIME type Entry like this:

Extension > Type

.dll > Assembly (Remove the stars and keep the dot on the extension)

  • You may try to run the IIS host process in 32 bit mode

  • You may try to create a wrapper of your dll's and host this wrapper dll's in COM+

Finally, according to this similar issue, you may refer to this and double check that the Handler is properly setup.




回答2:


I know this is an old question, but what I discovered was that the web browser was actually caching the the file download. I proved this by completely stopping IIS and accessing the URL and still it prompted me to download the file. I then restarted IIS, confirmed the same issue existed still, tried from a new private window and the DLL ran instead of prompting me to download.

In short, try private mode or a different web browser after you've configured everything.



来源:https://stackoverflow.com/questions/49281098/iis-8-5-serving-dll-for-download-instead-of-executing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!