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 / February 2005

Tip: Looking for answers? Try searching our database.

Constraint Exception from Web Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 15 Feb 2005 13:45 GMT
All,

I am capturing a SQL constraint exception in my web service and am
attempting to "throw" it back at my asp.net page so I can put up an alert
box. For some reason I lose the contraint error and the web page sees it as
an exception.

How do I pass back the original type of the exception threw my web service?

Thanks
mike
SA - 16 Feb 2005 17:45 GMT
Mike,

I am not entirely sure if this is the answer you are looking for, but here
goes. When using WSE 2.0, exceptions will be wrapped in a SoapException. The
InnerException property of the SOAP exception object will be the original
exception.

Have you created that constraint exception class yourself? If so, is it
serializable? To make an exception that inherits from ApplicationException
serializable, you will need to do more than just add the
SerializableAttribute. You also ened a public constructor that takes two
specific arguments and an overridden GetObjectData method.

If you are not using WSE 2.0, then you're probably posting in the wrong
group. In that case, try
microsoft.public.dotnet.framework.aspnet.webservices

HTH,

Signature

Sven.

> All,
>
[quoted text clipped - 7 lines]
> Thanks
> mike
Mike - 17 Feb 2005 12:55 GMT
Thanks much - I'll try the other group. For now I did get it to work by
capturing the constraint error in the web service and then threw it back to
the page as a soap exception. This worked for me, but I am not sure this is
the right approach. I am definetly a little foggy about how to handle errors
thru the services....

> Mike,
>
[quoted text clipped - 29 lines]
>> Thanks
>> mike

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



©2008 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.