How do I handle errors???

Discussion in 'ASP .Net Web Services' started by Mike, Feb 17, 2005.

  1. Mike

    Mike Guest

    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?

    Where can I find a good article that discuss's how to handle error
    processing from web services??

    Thanks
    Mike
     
    Mike, Feb 17, 2005
    #1
    1. Advertising

  2. "Mike" <> wrote in message
    news:...
    > 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?
    >
    > Where can I find a good article that discuss's how to handle error
    > processing from web services??
    >
    > Thanks
    > Mike


    For interoperability reasons you cannot pass the original exception to the
    caller - a java consumer would have no idea what to do with e.g., .NET
    SqlClientException.

    You can, however, store information about the original exception in the
    Detail field of the SoapException. To see how this can be done, check out
    this article:
    http://www.microsoft.com/belux/nl/msdn/community/columns/jtielens/soapexceptions.mspx .

    Regards,
    Sami
     
    Sami Vaaraniemi, Feb 18, 2005
    #2
    1. Advertising

  3. You can also serialize your SqlConstraintError in the detail of the
    SoapException and deserialized it on your aspx. page



    "Mike" <> a écrit dans le message de
    news:...
    > 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?
    >
    > Where can I find a good article that discuss's how to handle error
    > processing from web services??
    >
    > Thanks
    > Mike
    >
    >
     
    Ghislain Tanguay, Feb 18, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dietrich
    Replies:
    1
    Views:
    648
    Joe Smith
    Jul 22, 2004
  2. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    965
    Mark Goldin
    Jan 17, 2004
  3. Jonas

    Handle errors in global.asax

    Jonas, Nov 16, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,173
    Patrice
    Nov 17, 2005
  4. Leon
    Replies:
    2
    Views:
    535
  5. =?ISO-8859-1?Q?KLEIN_St=E9phane?=
    Replies:
    3
    Views:
    454
    hanumizzle
    Oct 6, 2006
Loading...

Share This Page