Preventing HTML Errors from web service

G

Guest

I have an ASP.NET web service that is written in C#. The service is not called using a browser, instead it is called by another thick client C# application.

If my web service throws an exception, the exception is caught by the thick client in C# as expected. The exception text gets displayed in a message box. All this works just fine. However, the problem I am having is that if IIS throws its own excecption that has nothing to do with my service, then the error comes back as HTML. I understand that this would be fine if the service was being called from a browser, but, as I said, the client is another application.

How can I tell IIS to not send these messages back as HTML ?

Jerry J
 
B

bruce barker

create a custom error page(s) for your webservice vdir. it should be a valid
soap response.

-- bruce (sqlwork.com)


Jerry J said:
I have an ASP.NET web service that is written in C#. The service is not
called using a browser, instead it is called by another thick client C#
application.
If my web service throws an exception, the exception is caught by the
thick client in C# as expected. The exception text gets displayed in a
message box. All this works just fine. However, the problem I am having is
that if IIS throws its own excecption that has nothing to do with my
service, then the error comes back as HTML. I understand that this would be
fine if the service was being called from a browser, but, as I said, the
client is another application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top