1

I have a piggy back question off of @Mike C's question I have implemented what is in @rsbarro's answer. The asp.net custom error works fine, it's the IIS custom errors which doesn't want to work for me. I've found that the only way it wants to work is if I set the error to redirect to the custom 404 page, however, that's less than ideal since I need the original requested url. Below is what I have in my web.config.

For asp.net Custom Error Pages:

    <customErrors mode="On">
        <error statusCode="404" redirect="/404.aspx" />
        <error statusCode="500" redirect="/500.aspx" />
    </customErrors>

The above works just fine. And for IIS Custom Errors (which does not work).

<system.webServer>
      ...
      <httpErrors errorMode="Custom">
        <remove statusCode="404" subStatusCode="-1" />
        <error statusCode="404" path="/auto404.aspx" responseMode="ExecuteURL" />
      </httpErrors>
</system.webServer>

Running IIS7 in a classic app pool (can't use integrated because of Sitecore CMS), any ideas?

Community
  • 1
  • 1
VFein
  • 1,021
  • 2
  • 11
  • 23
  • I tried setting up custom errors in IIS for a Web Application with the Application Pool set to ASP.NET v4.0 Classic. Seems to me that everything works the same as it did in my answer to @Mike C's question. Are you running against ASP.NET 4.0 or ASP.NET 2.0? – rsbarro Mar 12 '11 at 15:34
  • I have the same problem. Did you find a solution? We're also using SiteCore so maybe that has something to do with it as this should work! – Steve Ward Nov 25 '11 at 05:20

0 Answers0