homepage Welcome to WebmasterWorld Guest from 54.205.205.47
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
How can I get a 500 server error message to show as a 404
hundreds of urls with 500 error messages
deanw




msg:3522436
 3:15 pm on Dec 7, 2007 (gmt 0)

I need to delete hundreds of records in my database that will result in 500 'current record has been deleted' error messages
with the URL's. I have a user friendly page for visitors but I really need to show these URL's as 404's. Any suggestions on how to do this?

 

Receptional Andy




msg:3523613
 7:51 pm on Dec 9, 2007 (gmt 0)

This sounds to me like there isn't any error checking within the script itself, and so you're falling back to default errors.

Now, I'm not too hot on ASP, and without knowing the code that triggers the error there's only so specific I can get. But if my assumption is correct it should be a fairly straightforward error routine: if records don't exist, then output a 404 header with Response.Status = "404 Not Found".

It might be possible to hack a custom error document to try to achieve a similar thing, but unless I've misunderstood what's going on that wouldn't be a very good approach.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved