Please MS people: Question on Web Services and Custom Exception 
Author Message
 Please MS people: Question on Web Services and Custom Exception

Hi,

What I am trying to do, is to create a web service for a Web application.

First, I have a class library that contains my Exception Class (custom
exception).

I am importing this class into my web service, and at some point when
something

happens, I am raising this custom exception. Up to this point, everything if
fine.

The problem is that, in the Web Form (which I also imported the class
library), I am

accessing the service methods inside a try block but I can not catch my
exception.

Instead, I always get the following exception in the message.

System.Web.Services.Protocols.SoapException: Server was unable to process

request. ---> ClassLibrary1.MyException: Hello World at

WebService1.Service1.Thrower() in
c:\inetpub\wwwroot\WebService1\Service1.asmx.vb:line 51

As you can see Soap exception is thrown. My own exception is inside the
message together with

my message (in this case is Hello World) !!!

Can you throw a custom exception in a webservice or not? I would appreciate
if anybody

from MSFT would answer since nobody was able to do it up to now.

Thanks,

Theo. S.



Thu, 25 Dec 2003 02:44:02 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Custom Exceptions in Serviced component

2. Exception from ReadResponse() in System.Web Services.Protocols.SoapHttpClientPro

3. MS Access with .Net web services

4. peer web services please help me

5. web service question...

6. A question on designing Web services

7. Question about Web Services

8. web service and updating web reference with vb.net design time vs run time

9. Exceptions in Windows Service being ignored

10. Windows Service Config FileNotFound Exception

11. passing variable argument list from web page to web service (is it possible)

12. web service and updating web reference with vb.net design time vs run time

 

 
Powered by phpBB® Forum Software