HttpHandler not working in IIS 7

心不动则不痛 提交于 2019-12-18 14:54:16

问题


I have an HttpHandler configured in my web.config file like so:

<add verb="GET,HEAD,POST"
     path="TinyMCE.ashx"
     type="Moxiecode.TinyMCE.Web.HttpHandler,Moxiecode.TinyMCE" />

When I deploy to IIS 7 the handler stops working (404).

What do I need to do to get this working?


回答1:


Registration of HttpHandlers is different for IIS7 than for previous versions of IIS. Specifically, you register the handlers in the web.config section named <system.webServer><handlers> not in <httpHandlers>.

See this question for an example.




回答2:


We have a legacy application where changing the webconfig to user system.webServer -> handlers was not an option. We solved this 404 issue by setting the application pool's "Managed Pipeline Mode" to "Classic" on our development machines.

Here is the blog post where I found this solution http://codeskaters.blogspot.ae/2014/04/httphandler-error-404-not-found.html



来源:https://stackoverflow.com/questions/1465859/httphandler-not-working-in-iis-7

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