title: Classic ASP IIS7 Custom 404 Handler
body: <p>At witts end with this problem.</p>
  
  <p>I am working on a busy site which we have migrated from IIS6 to IIS7, which uses a custom 404.asp handler to process SEO friendly URLS and return the correct content from included asp scripts.</p>
  
  <p>We have managed to get the 404 method to work on IIS7, but if there is a error in the code somewhere, we have set iis to run 500.asp which is designed to log the error and returns a useful message to the user.</p>
  
  <p>So the flow should be : </p>
  
  <p>User types Friendly URL : e.g. <a href="http://www.sitename.com/testarticle/" rel="nofollow">http://www.sitename.com/testarticle/</a>
  Which does not exist and fires 404.asp
  404 looks up "testarticle" in our database and returns the correct content.
  That all works..</p>
  
  <p>If error Should call 500.asp 
   - Logs Error in our Log (Works)
   - Returns Msg to the screen (Not working - Just Get Blank Page)</p>
  
  <p>This worked in IIS6, however in IIS7 the 500.asp logs the error in our log, but absolutely nothing is written out to the screen - We just get a blank screen. Very Frustrating.</p>
  
  <p>We have tried changing what feels like every setting in IIS, and web.config but we can't get this to work. </p>
  
  <p>Any help much appreciated..
  Cheers</p>