Quantcast
Channel: Jeong's Blog
Viewing all articles
Browse latest Browse all 23

IIS URL Rewrite - one of known issues with the rewriteBeforeCache feature

$
0
0

I ran into IIS worker process (w3wp.exe) crash issue under specific conditions:

  1. If IIS apppool is running in the Classic mode
  2. ExtensionlessUrlHandler is configured
  3. IIS Url Rewrite outbound rule is configured with enabling with setting rewriteBeforeCache="true".

After investigating the issue to avoid the crash issue, I find one recommended workaround of the issue.  

Because the crash issue happens under those conditions, there are various workaround ways like this:

  1. If we use Integrated Mode instead of the Class mode, there is no issue.
  2. Or, if we remove the ExtensionlessUrlHandler modules, the issue is also fixed even though the classic mode is being used.
  3. Finally, if we disable the rewriteBeforeCache feature, the issue can be solved as well even though we keep using the Classic mode and the ExtensionlessUrlHandler module. 

NOTE

  1. If rewriteBeforeCache is enabled, URL Rewrite's outbound rule won't be applied for the extensionless requests because the ExtensionlUrlHandler sends the response ealier than Url Rewrite module. If you want to apply the outbound URL Rewrite rule to the extensionless requests as well, you should consider disabling the rewriteBeforeCache feature.
  2. If rewriteBeforeCache is disabled, there can be some performance penalty. So, you should make optimized Url Rewrite outboud rules to avoid high CPU usage.

In my opinion, disabling the rewriteBeforeCache feature is the simplest (not causing any functional change) workaround way in order to avoid the crash issue.

So, here I'd like to sho the way about how to disable the rewriteBeforeCache feature.

Considering the fact that the default attribute value of the rewriteBeforeCache is "false", you can disable the feature with changing the IIS Url Rewrite ouboundRule section as the following:

    <rewrite>

        <outboundRules>

        ...

- Or -

    <rewrite>

        <outboundRules rewriteBeforeCache="false">

        ...


Viewing all articles
Browse latest Browse all 23

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>