Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Microsoft Dynamics AX forum / Class ‘xxx’ method UAX...
Microsoft Dynamics AX forum
Unanswered

Class ‘xxx’ method UAX Access to the ‘AppWebService’ has been refused.

Posted on by 75

The questions are as follows:

I have two accounts, builduser and api101, with the same ad administrator and role.

When I restart ax service: builduser can call API normally, but api101 reports the following error:
     Class ‘getItemCode’ method UAX Access to the ‘AppWebService19101A001’ has been refused.

When a user starts the project: api101 can also call the API normally


Project situation

1. Publish AX ServiceGroup

2. C# project reference refers to WSDL

3. Publish the C# project to IIS.

4. When the C# project calls the AX method, the following information is passed for authentication

            context.Company = HttpContext.Current.Request.Headers[DataConst.COMPANY];

             // Domain

             serviceClient.ClientCredentials.Windows.ClientCredential.Domain = HttpContext.Current.Request.Headers[DataConst.DOMAIN];

             // UserName

             serviceClient.ClientCredentials.Windows.ClientCredential.UserName = HttpContext.Current.Request.Headers[DataConst.USER];

             // Password

             serviceClient.ClientCredentials.Windows.ClientCredential.Password = HttpContext.Current.Request.Headers[DataConst.PASSWORD];

             // AX method

             itemNum = serviceClient.getItemCode(context, brand, item, vendCategory, maker, itemSequence);

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans