Recursive rule checking causes overflow

Topics: Rules, Setup
Apr 25, 2013 at 10:58 AM
Edited Apr 25, 2013 at 2:49 PM

I've just installed Url Rewriter as a nuget package in my ASP.Net MVC 4 web app. I'm testing it locally and can't get rewrites to work.
I only have one rule in the ManagedFusion.Rewriter.txt file, but in the log file I see that for each request, the files is processed a dozen times. It matches the rule correctly, the output is valid (i.e. a URL that is correctly routed to my controller/action). But this is repeated over and over (input as the url I type, valid output) until I get a 500 error due to an overflow.

Any idea what's wrong there? Why can't it stop processing the request against the rules?

Setup: MVC 4 /.net 4.5
Url Rewriter
Tested with IIS 8 and IIS Express 8

Edit: out of despair, I removed the nuget package reference, and cloned the source code and referenced it instead. Still the same issue, but by debugging it I can see that the RewriterModule.context_BeginRequest method is called 10 times for each request that matches a rewrite rule. The input is always the same, and the output the correct one. However, I still have no idea of the reason it does so.