0

This is a production IIS web server that has been up and running fine for a month. There are 6 sites on the server, and last week one site started to give random 500 errors. The was one of two site using URL Rewrite. We spent about 2 1/2 hours with a well versed consultant who could not give a definitive answer. The rewrite rule was:

<httpErrors existingResponse="PassThrough" />
<rewrite>
  <rules>
    <rule name="Redirect .cfm extension" stopProcessing="false">
      <match url="^(.*).cfm$" ignoreCase="true" />
    <conditions logicalGrouping="MatchAny">
      <add input="{URL}" pattern="(.*).cfm$" ignoreCase="false" />
    </conditions>
      <action type="Redirect" url="{R:1}" redirectType="Permanent" />
    </rule>
    <rule name="hide .cfm extension" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="true" />
    <conditions>
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
      <add input="{REQUEST_FILENAME}.cfm" matchType="IsFile" />
    </conditions>
      <action type="Rewrite" url="{R:0}.cfm" />
    </rule>
</rules>

The failed trace showed enter image description here

We removed that rule have have been trouble free since.

Now the other site using URL Rewrite is giving random errors, but this one is a bit more complicated to fix as it's or API.

<httpErrors existingResponse="PassThrough" />
    <rewrite>
        <rules>
            <rule name="ApiWithControllerAndId" stopProcessing="true">
                <match url="^([^/]+)/([^/]+)/([^/]+)/?$" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.cfm?controller={R:1}&amp;method={R:2}&amp;id={R:3}" />
            </rule>
            <rule name="ApiWithController" stopProcessing="true">
                <match url="^([^/]+)/([^/]+)/?$" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.cfm?controller={R:1}&amp;method={R:2}" />
            </rule>
        </rules>
    </rewrite>

They come and go seemingly at random. There's nothing we've hit upon that can guarantee a 500 response. We have an identical staging server that has not given any 500 errors. I just enabled failed request tracing on this site but so far have no captured a 500 error.

Steve
  • 129
  • 5
  • Failed request tracing shows an ISAPI filter returned 500.0, so you need to drill down deeper to see which filter it is. No need to guess when FRT contains much more. – Lex Li Feb 03 '20 at 23:37
  • It's isapiredirect.dll for Tomcat / ColdFusion 2018 – Steve Feb 03 '20 at 23:49
  • Then only the vendor/developers of that dll can answer this question. It has little to do with IIS then, as this is a third party extension. – Lex Li Feb 03 '20 at 23:51

0 Answers0