Sladescross's Blog

Blogging about Sharepoint related stuff

404 Error Handling Redirect May 1, 2012

Filed under: 404,Error Redirect — sladescross @ 11:54 am

What follows is a summary of what worked for the benefit of others:

Our Environment:

  • Server 2008 Hyper-V nodes running in a Microsoft NLB webfarm in DMZ
  • IIS7 integrated pipeline
  • FTP7 passive web publishing
  • Visual Studio 2008 C#. based Web Application Projects

What I changed as per ksingla’s advice:

I yanked the following code from my site’s web.config file:

<customErrors mode=”On” defaultRedirect=”~/Error-Handler.aspx”>       <error statusCode=”404″ redirect=”~/Page-Redirector.aspx” />     </customErrors>

I modified my C:\Windows\System32\inetsrv\config\applicationHost.config file as follows:

<system.webServer>    …             <httpErrors errorMode=”Custom” existingResponse=”Replace”>                 <remove statusCode=”404″ subStatusCode=”-1″ />                 <error statusCode=”404″ prefixLanguageFilePath=”” path=”/Page-Redirector.aspx” responseMode=”ExecuteURL” />             </httpErrors>    </httpErrors>    … </system.webServer>

One last note: I searched the internet for the existingResponse=”Replace” snippet you offered, and found only two pages, both with your fingerprints on them… is this presently (or will it be in the future) documented somewhere?

I have been using my global.asax page to capture amplifying information on errors… I am grateful to see that still seems to work… any cautions with this new model/configuration?Grateful for all,   Databoy

About these ads

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 63 other followers