web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Consuming web service using C#- Unable to catch exception in AX(2009)

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I have created a AIF- document service in AX 2009. I am doing a picking list registration update in AX. I have my code in try and catch in AX. 

MY ISSUE:

when I test the service in AX through a test job, I can able to catch the exception in the catch code. But, when I consume the service through C#, I can't able to catch the exception. In other words, the code is not coming to the catch part. 

I don't know why I can't catch exception when I am consuming the service.

Any suggestions would be helpful.. 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi

    At the link below I guess you can find your answer.

    stackoverflow.com/.../cant-catch-exception-inside-aif-service

    Practically, when you throw an error inside AIF sevice it is going to abort the outer transaction and go to the AIF catch clause, skipping all others.

  • Community Member Profile Picture
    on at

    Thanks for the Reply Denis. It is helpful..!

  • Denis Macchinetti Profile Picture
    16,444 on at

    Great.

    If helped you, please tick the reply as verified.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans