Setup:
-Asp.net MVC website (siteA) with application_error handler implemented in global.ascx and only one Rule in the web.config (the reverse proxy rewrite rule).
-IIS reverse proxy setup with /subdirectory of siteA pointing to siteB domain.
-IIS rewrite module has been moved to the top of IIS modules list for siteA.
Problem:
The reverse proxy configuration works on a testsiteA that has nothing in it the IIS folder except the iis rewrite rule in the web.config. No other folders, files, etc. This testsiteA works fine in that the rewrite rule works as imtended. However, when I apply the same rule to the real site, siteA, that has an asp.net MVC website Hosted the rewrite rule is never processed. Instead, the application_error handler is reached in the global.ascx and processing of the URL rewrite rule is not processed. I've tried to do Response.End(), clearing server errors, basic 'return;' statement to end execution, all in the application_error handler but none have worked.
How do I get IIS or the asp.net pipeline to process the URL rewrite as top priority?