Z
ziondreams
There seem to be errors that are "un-trappable" through web service
code as asp.net simply outputs it's own error message to the page when
they occur. For example,
Let's say I've got the following simple web service in C#:
[WebMethod]
public string testOne(string input)
{
return input;
}
Now, if I attempt to call testOne() without providing an input
parameter, I get the following message in my browser:
Missing Parameter: input
Is there anyway to "trap" this error and present my own custom error to
the user?
Other examples of errors I would like to trap include:
--Sending a SOAP envelope to the webservice that is malformed. I know
this sounds odd, but I would like to return a custom error instead of
simply a 500 error.
--I'm sure there's more but that's all that I can think of for now.
Thanks,
Kyle
code as asp.net simply outputs it's own error message to the page when
they occur. For example,
Let's say I've got the following simple web service in C#:
[WebMethod]
public string testOne(string input)
{
return input;
}
Now, if I attempt to call testOne() without providing an input
parameter, I get the following message in my browser:
Missing Parameter: input
Is there anyway to "trap" this error and present my own custom error to
the user?
Other examples of errors I would like to trap include:
--Sending a SOAP envelope to the webservice that is malformed. I know
this sounds odd, but I would like to return a custom error instead of
simply a 500 error.
--I'm sure there's more but that's all that I can think of for now.
Thanks,
Kyle