How to handle exceptions thrown by asmx services?

The ASP.NET ASMX service sometimes throws exceptions. However, the global_asax Application_Error method does not seem to catch them. The question is how to set up a global error handler to catch and log these exceptions?

+3
source share
3 answers

The main problem (and this is not a problem) with the ASMX web service is that any exception behind the service layer is selected as the SOAP exception for the client. You need to catch the SOAP exception and then look for the internal exception there.

, SOAP . SOAP . , , .net framework.

HTH

+2

ASMX JavaScript AJAX, ?

Javascript, JS, , - , -.

ASMX, , , Application_Error, , ASMX XML JSON, , .

0

Client side. I will just pass your call to the service in JavaScript. On the server side, the error should be logged in your server log as. http 500 error

0
source

Source: https://habr.com/ru/post/1698249/


All Articles