NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Thys on January 18, 2012, 12:07:49 AM

Title: Returning something like "Page not found"
Post by: Thys on January 18, 2012, 12:07:49 AM
Hi,

I have a page with the name "Call" that acts like a web service. The first parameter is "name" which is the function name it should call and all subsequent parameters are specific to the function that is called.

When the Call page is called and the function name is unknown, I would like to return a similar response that NT gives in the case where a page is not found (404). Where in the WebHandler can I do this?

Thys
Title: Re: Returning something like "Page not found"
Post by: Bruce on January 18, 2012, 12:49:56 AM
Are you asking how to override the 404 error?
In all cases, or just this case?

Check out example "ErrorPage (32)" for some ideas on overriding the error page returned.

cheers
Bruce
Title: Re: Returning something like "Page not found"
Post by: Thys on January 18, 2012, 01:00:30 AM
Bruce,

It's just the opposite of what you are asking. I want to produce error 404 even though the page exists.

Thys