关于项目里重写httphandler的话,在发布时注意的事项
1、webconfig文件里 引用重写的handler时注意事项
iis6 下
<system.web>
<httpHandlers>
<add verb="*" path="*.do" type="Services.Services.Handlers.DispacherHandler, Services"/> // 我项目里用到的handler
</httpHandlers>
</system.web>
iis7下
<system.webServer>
<handlers>
<add name="DispacherHandler" preCondition="integratedMode" verb="*" path="*.do" type="Services.Services.Handlers.DispacherHandler, Services"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
也可以写两次,上边的两种写法都写上,是不冲突的
2.如果是发布在iis6上的话,要添加访问对象的映射
例如,上边我添加的handler,path里是“do”类型,所以要在服务器上添加对他的映射,如下图
注意,红色方框内不勾选!