IIS 7.5, Multiple Application Pools, and URL Rewriting (403.18 — Forbidden)

application-poolsiis-7.5isapi-rewrite

Is there any way to configure IIS 7.5 to perform URL rewrites to different application pools on the same site without running into a 403.18 error?

We're using Helicon ISAPI Rewrite 3 on IIS 6 and it's working like a charm. The root-level "application" is running under it's own application pool, and on IIS 6 we have no problems doing URL rewrites from that application pool to any one of the other four application pools. But when I copy the same server configuration information over to IIS 7.5 the URL rewrites to any of the other application pools fail with a "403.18 — Forbidden" error.

The weird bit is that the IIS 6 is not (at least as far as I can tell, by looking at the site Service configuration dialog) running under IIS 5 emulation mode, so somehow the rewrites aren't throwing 403.18 errors. So something must be different… but whatever it is, I sure haven't been able to figure it out.

Btw, we're not married to Helicon ISAPI Rewrite. If there's another way to preserve our current rewrite configuration rules using another module or method I'd be more than happy to use it.

Best Answer

In IIS you cannot just route request from one application to another. Applications are isolated, that is why you are getting 403 error.

You can proxy requests using either ISAPI_Rewrite, Ape or ARR - it does not matter because request will be passed to another application using local HTTP request anyway. This solution is quite stable, but you will lose some performance.

Redirect is probably not an option here, because it will generate two request to the server anyway, but since request will be generated by the user with slow connection performance may drop significantly.