Nav Web Services Authentication problems

Jes_Kristensen
Member Posts: 6
I've made several web services (both SOAP and ODATA) in Nav, and when I call these from a Visual Studio program, they work well. BUT if I test them from a Web Service Test program, e.g. Boomerang (Google Chrome), SOA Client (Firefox), SoaUI, all tests returns Authentication error (401). I've tried to alter the authentication types, and even set the NAV to use NTLM authentication without any success.
A webshop programmer who should consume one of my webservices from a PHP program had a similar problem. We digged a lot in the Internet, and there was several propositions to what to do, but nothing worked.
Is there anybody in here, who might have any clue for a solution? That would be great!
Best Reagards Jes Kristensen
A webshop programmer who should consume one of my webservices from a PHP program had a similar problem. We digged a lot in the Internet, and there was several propositions to what to do, but nothing worked.
Is there anybody in here, who might have any clue for a solution? That would be great!
Best Reagards Jes Kristensen
0
Comments
-
Yeah its a issue. Right now i m working on SOAP webservices. It works well with Visual studio but not with tools like SOAP UI, POSTMAN etc.
Try webservice studio. Hope this works with your service.
Link to download: https://webservicestudio.codeplex.com/
If it does not work, don't worry it happens. Just try to consume in Visual studio or some other client it will work.
Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.1 -
Don't use "UseDefaultCredentials" <- doenst really work for me
Try System.Net.WebPermission.Austrian NAV/BC Dev1 -
@Wisa123 is right, when you try to use the webservice remotely the "UseDefaultCredentials" does not works.Best Regards:
Zaid Tariq
Dynamics NAV/365 BC Developer at Dynamics 360
please like / agree / verify my answer, if was helpful.-1 -
Thank you for your quick replies
But it is not actualy calling the web service from a Visual Studio project, which is the problem - it works weel. The main problem is the authentication problems from the various test clients and plugins or joust calling a Nav web service from a non Visual Studio project. The mentioned Webservice Studio / Codeplex (from 2008) which should work, is a Visual Studio project too, and therefore it will work (but good to know, there is at least one test program whick works for a Nav Web Service!). It seems to Navision web services only can be called from a Visual Studio project, and from no other platforms, neither the common test tools nor e.g. a PHP program.
It would be very nice if I am wrong, and somebody knows how to call a web service from a non Visual Studio platform
Best regards Jes Kristensen0 -
@Jes_Kristensen its not a visual studio project. Its a tool for testing the SOAP based webservices. Its a project developed in .NET. You can use this tool. I find useful when i was testing my webservice.
Also, please check the SOAPUI tool if you didn't.
Hope this helps.Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.1 -
I've tried SoapUI - the same, authentication error 401...it seems that a Nav web service exclusively can be called from at .Net application and not from nothing else... I hope I'm wrong and you are very welcome to convince me about it if so
Best regards Jes Kristensen1 -
Jes_Kristensen wrote: »I've tried SoapUI - the same, authentication error 401...it seems that a Nav web service exclusively can be called from at .Net application and not from nothing else... I hope I'm wrong and you are very welcome to convince me about it if so
Best regards Jes Kristensen
Yes and for future purpose use WebStudio tool which i have mentioned above its great and works like a charm with NAV web service.Some days ago i was facing the same 401 authorization issue but trust me this tool saves me.
Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.1 -
I think I'll rephrase my question to: Is it possible to call a Nav Web Service from other applications than .Net applications, e.g. PHP, without getting authentication error (401)?0
-
Jes_Kristensen wrote: »I've tried SoapUI - the same, authentication error 401...it seems that a Nav web service exclusively can be called from at .Net application and not from nothing else... I hope I'm wrong and you are very welcome to convince me about it if so
Best regards Jes Kristensen
SoapUI works with NAV Webservices, at least the 5.3 version.
You need to fill the Username and Password in the Request Properties.
Regards.1 -
Jes_Kristensen wrote: »I think I'll rephrase my question to: Is it possible to call a Nav Web Service from other applications than .Net applications, e.g. PHP, without getting authentication error (401)?
Yes you can. Not only php but from any platform.
For PHP have a look: https://blogs.msdn.microsoft.com/freddyk/2010/01/19/connecting-to-nav-web-services-from-php/
https://www.adv-usa.com/2016/06/29/connecting-to-dynamics-nav-web-services-using-php/Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.2 -
Thank you - good to have some guides to developers who must call our web services from PHP.1
-
@Jes_Kristensen you are welcome. Please accept my answer if it is helpful for you.Best Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.1 -
open CustomSettings.config file and replace
<add key="ServicesUseNTLMAuthentication" value="false"/>
with
<add key="ServicesUseNTLMAuthentication" value="true"/>4
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions