c# - In .NET web services, how can the SoapException.Message property be easily readable? -
i writing asp.net web service , throwing soapexception message:
throw new soapexception("bang!", soapexception.clientfaultcode);
when create asp.net client, , request label display soapexception.message property, displays message similar following:
system.web.services.protocols.soapexception: bang! @ webserviceexception.webservice1.helloworld() in [directory]\webservice1.asmx.cs:line 23
is there easy way presented message bang! rather entire string? or should use regular expressions?
if configure web service turn on custom error messages, stack trace not present in soap fault, in turn mean client not see it.
in web.config:
<?xml version="1.0" encoding="utf-8"?> <configuration> ... <system.web> ... <customerrors mode="on"/> ... </system.web> ... </configuration>
Comments
Post a Comment