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)

AIF webservice 401 unauthorized using SOAP w/ NTLM

(0) ShareShare
ReportReport
Posted on by

I've spent days searching for a solution to get a simple HTTP webservice, salesorder.read, working off of a JAVA client with no avail. We're trying to achieve communication first via NTLM as this was suggested in many forums, but I'm open to other suggestions. My testing criteria is to get it working on VS first, then SOAP UI and finally java. I've been successful at testing with VS, however I haven't had any luck with SOAP UI.

Configuration:

-AX 2012 R3

- Changed HTTP configuration binding from Windows to NTLM (as suggested in many posts)

- IIS

- Authentication set to Windows and Basic Authentication

- Windows authentication providers; NTLM set as primary

- SOAP UI

- Basic configuration w/ Authentication set to NTLM

- Verified lmcompatibilitylevel set to 1 on server

The response has ever been "An error occurred." or "401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied."

  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Stale connection check
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Attempt 1 to execute request
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Sending request: POST /MicrosoftDynamicsAXAif60/WebSalesOrderRead/xppservice.svc HTTP/1.1
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Connection can be kept alive indefinitely
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Target requested authentication
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Authorization challenge processed
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Authentication scope: NTLM @<website>:80
  • Tue Dec 20 11:06:41 EST 2016:INFO:<website>:80 requires Windows authentication
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Found credentials
  • Tue Dec 20 11:06:41 EST 2016:DEBUG:Attempt 2 to execute request 

Event viewer on the server shows a similar error, "Object Server 01:  An error has occurred in the services framework.  Method: AifMessageInspector::AfterReceiveRequest.  Error: System.Security.SecurityException: The user name or password is incorrect."

My first question would be what should be the correct user/pass, is it in terms of IIS or AX? We've tried multiple of combinations of course, but perplexed at this issue and led to believe it's something more. 

Please, any insight would be appreciated.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    I wonder why you ask which user to use. If you successfully tested in Visual Studio and now you want to try the same thing in SoapUI, why do you consider using a different account? If you use two different accounts, you test two different things. What's your reasoning behind that?

  • Community Member Profile Picture
    on at

    Good question and this is where I'm confused as well, but chalk it up to WCF ease within .NET framework.

    The difference is in VS no authentication was required, as soon as I add the wsdl part of the service reference, it found and resolved the webservice methods. I followed the standard example from technet on Exchanging documents by using the HTTP adapter (https://technet.microsoft.com/en-us/library/hh496418.aspx)

    That's why my primary test focus is getting communication with SOAPUI at the moment. I hope that clarifies my issue.

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    VS won't ask for any credentials, because it uses the current user. Therefore you should use the same user in SoapUI as well. If you decide to use another users, test it VS first, otherwise you'll be comparing two different test cases.

    By the way, you'll find WCF experts in WCF forums.

  • Community Member Profile Picture
    on at

    Hi Martin,

    I'll be sure to ask in WCF forums, thank you for the suggestion.

    I've ensured that I have one use case now, same credentials being tested in both VS and SOAPUI. But I'm getting the same results unfortunately, works in VS but not with SOAP UI.

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Make sure you've set up authentication in SoapUI correctly. You may be interested in the thread Testing web service with SoapUI and Windows authentication, which discuss some problems with authentication in SoapUI and suggests some workarounds. Note that SoapUI has a forum as well.

  • Datum Vela Profile Picture
    20 on at

    I am also facing the same issue, were you able to figure out this issue?

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans