Re: Constraint Exception from Web Service

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mike (annon_at_hotmail.com)
Date: 02/17/05


Date: Thu, 17 Feb 2005 07:55:59 -0500

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

"SA" <informatica@freemail.nl> wrote in message
news:eGpSL9EFFHA.2608@TK2MSFTNGP10.phx.gbl...
> 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,
>
> --
>
>
> Sven.
>
> "Mike" <annon@hotmail.com> wrote in message
> news:OIseKT2EFHA.3512@TK2MSFTNGP10.phx.gbl...
>> 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
>>
>>
>
>



Relevant Pages

  • Constraint Exception from Web Service
    ... I am capturing a SQL constraint exception in my web service and am ... How do I pass back the original type of the exception threw my web service? ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Workaround to Assembly reference for Managed/Unmaged C++ dll in ASP.Net
    ... Calling C++ library from ASP.NET web service ... (Exception from HRESULT: 0x8007007E) ... 2005 Runtime Libraries on the machine)? ... assemblyName, Boolean starDirective) +32 ...
    (microsoft.public.dotnet.framework.webservices)
  • got any better solution on this?
    ... Calling C++ library from ASP.NET web service ... (Exception from HRESULT: 0x8007007E) ... 2005 Runtime Libraries on the machine)? ... assemblyName, Boolean starDirective) +32 ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Write to IIS/Event Log File ?
    ... >with an exception that might arise, ... >either in the web service, ... >Writting to the event log threw me Security Exceptions, ... NET Framework Class Library: ApplicationActivationAttribute ...
    (microsoft.public.dotnet.general)
  • Re: do task constraints constrain subtasks?
    ... communicate what is happening. ... realistic picture of what is meant to happen. ... I guess I take exception to the statement that, ... tasks under the summary there is an overall constraint. ...
    (microsoft.public.project)