Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

AIF Service cannot be run with Windows Authentications

Posted on by 95

Dear Community ,

                                I have deployed the Webservice using basicHttpBinding in AIF Inbound Port and it is deployed in IIS as shown below figure

           pastedimage1597388750978v1.png

The Service is deployed with IDENTITY of ERPUser  as can be seen in the above image and Windows Authentication is enabled on it.

I can consume the application using .Net Application by passing credentials of ErpUser and it get effected on each table in ax Purchase and Sales 

When I am trying to access using ErpTest user ( same role in AX like ErpUser ) in my .Net Application . The different operations are performed under the credentials of ErpUser only .

My Requirement is I want to consume the service using ErpTest User .

I want to have erptest user to be registered on AX Tables whenever any changes happened in AX using .Net Client Application by passing ErpTest Credentials 

Kindly shed some light on it.

Thanks In Advance.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Abdul,

    Please update if this issue was resolved.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: AIF Service cannot be run with Windows Authentications

    Abdul,

    I changed the Application Pool user to the AOS account and it still works fine.

    Please try that option anyway and check if it works for you.

    Please share the App.config settings for the .NET application as well.

  • rizwan Profile Picture
    rizwan 95 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Bhattacharya,

    Application Pool User is different  than bussiness connector user in  AX 2012

    I will make the application Pool Identity User with User configured in Bussiness Connector and will reply you back

    Thanks for responding

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: AIF Service cannot be run with Windows Authentications

    Abdul,

    Is the user configured for the application pool the same as your business connector proxy user? I have the same settings as you do on my Dev box and it works without any issues

    Please share the App.config settings for your .NET application as well. 

  • rizwan Profile Picture
    rizwan 95 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hello Bhattacharyya,

                                      The Below Settings for WebService SGNInventQuarantineServiceHttpPort and the same settings are available for Default Website : 

    pastedimage1597387368807v1.png

    the below picture shows the application pool where ErpUser is defined at Identity column and by default the service is running on behalf of this user ( this user is get registered on AX Tables ) 

    pastedimage1597388524432v2.png

    ............................................................................................................................................................................................................................................

    For Below Code , I am able to process the operations but the operations are performed behalf of ErpUser ( The Modified field in AX Table is ErpUser )

    client.ChannelFactory.Credentials.UserName.UserName = @"sgn\ErpTest";
    client.ChannelFactory.Credentials.UserName.Password = @"Axa6";

    .......................................................................................................................................................................................................

    For Below Code , I am able to process the operations but the operations are performed behalf of ErpUser ( The Modified field in AX Table is ErpUser )

    client.ClientCredentials.UserName.UserName = @"sgn\ErpTest";
    client.ClientCredentials.UserName.Password = @"Axa6";

    .................................................................................................................................................................................

    For Below Code, I am getting this error "{"Failed to logon to Microsoft Dynamics AX."}"

    client.ClientCredentials.Windows.ClientCredential.UserName = @"sgn\ErpTest";
    client.ClientCredentials.Windows.ClientCredential.Password = @"Axa6";

    I want to have ErpTest User should be effected on AX Tables . 

    I request to community to kindly suggest me for the above problem

    Thanks In Advance.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: AIF Service cannot be run with Windows Authentications

    Hi Abdul,

    Could you please share the .net application code you are using to connect and also a screenshot of the AIF website authentication settings?

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... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans