Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2003

Tip: Looking for answers? Try searching our database.

Returning Enumeration or Exception from WebMethod?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tobias Lekman - 09 Aug 2003 18:06 GMT
Hi,

I am trying to raise an exception from within a WebMethod
in my web service. Is this possible at all? If so, how do
you do it?

If this is not possible, then I would be happy to return
an enumeration of response codes, but have been
unsuccessful in declaring and returning an enumeration.
Is this possible at all? If so, how do you do it?

Regards,
Tobias Lekman
Marina - 11 Aug 2003 18:26 GMT
Putting a statement like 'throw new Exception()', will do it.  Or just
having a line of code that does it.

What is returned is a SoapException object, I think.  But this should have
properties to let you drill down and get the contents of the original
exception.

> Hi,
>
[quoted text clipped - 9 lines]
> Regards,
> Tobias Lekman

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.