I'm trying to reference a web service on a NAV 2017 instance hosted in AZURE, from a new C# test project in Visual Studio on a local server.
In NAV, I'm going to "[Company]\Departments\Administration\IT Administration\Services\Web Services," and copying the SOAP URL for the desired service (object ID 21; Customer).
In Visual Studio (2015), I'm right clicking on "References" in the Solution Explorer, clicking "Add Service Reference...," followed by "Advanced..." in the popup, then "Add Web Reference..." I then paste the SOAP URL into the appropriate field, and hit Enter.
This is where the authentication problem begins. I get a dialog informing me that I;ll have to enter credentials (fig. 1), and then I get a Discovery Credential dialog (fig. 2). In the Discovery Credential dialog, I enter [Domain]\[Username] for my account, followed by the password. The account is configured as SUPER in the targeted NAV instance. After hitting enter, I get the first dialog again, and the authentication process repeats. No confirmation is given after submitting credentials (bad application design IMHO). The authentication repeats indefinitely so long as values are provided, correct or not.
![]() |
fig. 1 |
![]() |
fig. 2 |
Through multiple attempts with different services/protocols/anything I could think to try, I've gotten slightly varying results with the new Windows authentication dialog, and completion of the authentication process with a bad credentials message after 3 submissions (I am sure the credentials are correct). I am at a complete loss. Even ignoring the typo in the fig. 2 dialog, it's painfully clear that developers didn't care about polishing this utility.
Other Information:
Navigating to http://<Server>:<WebServicePort>/<ServerInstance>/WS/<CompanyName>/services (should list published SOAP services) returns an HTTP 401 (Unauthorized) status code.
Doing the same on the NST host machine at least brings up an authentication dialog, but still results in a 401 error after 3 entries of correct credentials.
The above test on the host machine reveals a certificate error. I'm not sure if this is relevant.
The NAV account is linked to a windows account with the same name.
The "All Tenants" and "Published" boxes are both checked on the web service.
I can run NAV without issue, connecting to the same instance and company from within my network.
The project I'm testing from is a C# class library project in a solution with a .NET MVC project, and several other class libraries. I double checked that this was not causing interference by trying again in an independent console application project.
Any insights would be greatly appreciated.