用URLRewirte地址重写
IIS6上地址重写为.html后如果页面无法访问就会提示404错误,比如http://www.afangfa.com/afasdfasdf.html
但是IIS7重写为.html外上去是提示Server Error in '/' Application.
例如http://www.wlwlm.org.cn/htsdf.html
除了.html外的其它的都可以提示404哈。比如http://www.wlwlm.org.cn/htsdf.htm
http://www.wlwlm.org.cn/htsdf/
请问我要如何设置才能让IIS7上不显示Server Error in '/' Application.也提示404错误啊?
iis7需要在Module节点立面设置dll
配置是正确的,我只是想让在*.html的时候404页面报出来
要添加 处理程序映射,然后添加管理处理程序,路径为:*.html,类型:System.Web.UI.PageHandlerFactory
<handlers>
<add name="/" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="URLRewriter" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
<handlers>
<add name="/" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="URLRewriter" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
已经添加了