Question

I have a ASP.NET web application that implements url rewrite throught an Http Module. 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.

Was it helpful?

Solution

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.

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!).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top