0
我的应用程序处理友好的URL的自定义HTTP模块。 这里是web.config文件的模块部分。.NET自定义的HttpModule错误页面问题
<modules>
<remove name="ScriptModule"/>
<remove name="Session"/>
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition=""/>
<add name="NHibernateSessionModule" type="MyApp.Core.NHibernateBase.NHibernateSessionModule"/>
<add name="ApplicationModule" type="MyApp.ApplicationModule"/>
<add name="URLDispatcher" type="MyApp.URLDispatcher"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
该模块还具有处理错误页面的逻辑。我现在遇到的问题是当一个URL以'。'结尾的请求时。被发送到服务器,我的模块都没有被触发,用户可以看到默认的asp.net 404页面。
不知道发生了什么,以及如何将用户重定向到我的自定义404页。
我没有找到与此相关的另一个问题,并且提供的解决方案是使用在web.config文件中的.NET 4的具体配置的标签之一。目前我无法移动到.Net 4.所以,我正在寻找不同的解决方案。有什么建议么?