简体   繁体   English

IIS.7用http模块完成的URL重写错误

[英]IIS.7 Error on url rewrite done with http Module

I have a ASP.NET web application that implements url rewrite throught an Http Module. 我有一个ASP.NET Web应用程序,该应用程序通过Http模块实现URL重写。 Each rewrite rule are loaded from a database table. 每个重写规则都是从数据库表中加载的。

After I added a new rule I got the following error: 添加新规则后,出现以下错误:

 Value does not fall within the expected range.
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 Exception Details: System.ArgumentException: Value does not fall within the expected range.

I don't find anyting in application logs. 我在应用程序日志中找不到任何内容。

In this case, after a long investigation I found the character 在这种情况下,经过长时间的调查,我发现了角色

\n

after redirection url name. 重定向网址名称之后。

When http module send redirect to IIS, all went Ok, but during request processing IIS itself got the error above. 当http模块将重定向发送到IIS时,一切正常,但是在请求处理期间IIS本身收到了以上错误。

I think that's a very strange error, and I spent lot of time to detect, so I think to share solution (of course it's all my fault!). 我认为这是一个非常奇怪的错误,我花了很多时间进行检测,因此我想分享解决方案(当然,这全都是我的错!)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM