Total Pageviews

Search This Blog

Sunday, May 16, 2010

Dynamics AX 2009 AIF - Error Access to Service

Last week, I was involved in creating a custom webservice using AIF (Dynamics AX 2009). Last time when I worked on AIF development, that was with AX 4.0 ,which then had the limitations for update operation and which got resolved in one of the service pack released later.

I created this custom query and then ran the AxD Wizard inorder to generate my custom services. The service got created successfully which I had to consume in my .Net test harness application ( a simple .Net Windows client app to test my service by passing the required parameters). As expected, my first attempt never works without giving me an error ;-), I spent some time digging into this checking in Windows Event Viewer and .Net Stack Trace without any luck. Later on, it striked me to go and check into the Exception raised in AIF in AX.

I navigated to Basic => Periodic => Application Integration Framework => Exceptions and got this error description "The User does not have access to the service" though it was not a proper descriptive one, it gave me some insights where to debug..

I put the breakpoint in the below class AifRequestProcessor (verifyRequestIsAllowed method) and found the actual issue was that the new service created by me does not have a security key assigned to it. Once the Security key was assigned this helped in resolving the error.

Thought posting some AIF links/blogs which might be useful ..

Troubleshoot AIF

Consuming AIF Web Service is VS 2008

AIF Error Access to Service

Dynamics AX - AIF WebService for AxdSales Order!F2EC589E221A4DB0!133.entry

How to: Call an AIF Web Service from C#

AIF Integration using web services

AIF Find/Read in Dynamics AX

Dynamics AX integration using AIF

Creating Custom Dynamics AX Services


Anonymous said...

Exactly my issue. Thanks.

Anonymous said...

Exactly my issue. Thanks!

Anonymous said...

Exactly my issue. Thanks!

Anonymous said...

Even after selecting the security key I'm getting the same error. I'm also using the security key in other services which I'm able to access. any ideas?