c# - How to get error message when a webservice method throw exception. -



c# - How to get error message when a webservice method throw exception. -

i utilize webserviceproxy.invoke phone call webservice method. realized 1 of parameter function handle error coming when method throw exception.

i seek method get_message() error message. work-well when access localhost. when access method remote computer, message changed standard error: "there error processing request".

callws = function (args) { // phone call webservice fill content panel sys.net.webserviceproxy.invoke(_servicepath, _servicemethod, false, { contextkey: args }, function.createdelegate(this, onsubmitcomplete), function.createdelegate(this, onsubmiterror), args); } onsubmitcomplete = function (result, usercontext, methodname) { ... } onsubmiterror = function (result, usercontext, methodname) { // note: result.get_message() contain exception message when // accessed localhost, contain "there error processing request" // when accessed remote computer alert(result.get_message()); }

asp.net runtime errors not meant displayed customers in deployment environment, server correctly configured not show customerrors in deployment, in case want debug code, can either set mode flag of customerrors in web.config off, or leave remoteonly , debug code right on server!

c# javascript asp.net web-services error-handling

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -