Connect TO Nav Web Services from external IP?

u382514u382514 Member Posts: 12
edited 2013-03-11 in NAV Three Tier
I have developed an app that uses the Nav Web Services. I can connect with no problems via localhost (http://localhost:7047/Dynamics_NAV....). I then tried to connect via the machines IP address running the service tier (http://192.169.2.10:7047/Dynamics_NAV....). This works however I need to put in a username and password for it to pull up. That's problem number 1. How do I get around that initial login box. At the very least when I put in the credentials it'll pull up fine using the machines IP address. So then logically I opened up the port on the router to forward 7047 to that machine. When I use the external IP however I get a HTTP 400:Bad Request (http://69.192.22.10:7047/Dynamics_NAV...). That's problem number 2. I know port forwarding works as I do it a lot with this router. I fear this all has to do with SPN's and a whole lot of other things I know nothing about. Is there a clear concise manual/How To out there to get Nav Web services opened to the outside world?

Thanks,
-B-

Comments

  • Wisa123Wisa123 Member Posts: 308
    http://dynamicsuser.net/blogs/waldo/arc ... on-no.aspx

    check this, should help you ... also try the search function in the forum ... this question has bein asked at least 3 times this week.
    Austrian NAV/BC Dev
  • u382514u382514 Member Posts: 12
    Thanks Wisa123 however that link is for showing how to consume a web service. I'm looking for concise instructions on opening up NAV services for external use. I should be able to type in the address (external IP) and see the description of the service (WSDL). Works for localhost, local IP (albeit with credentials) but not external IP. Also I've tried the search function and read through a lot of posts similiar to my problems but there wasn't any real solution provided other than 'go read this ambiguous link about something that doesn't really relate to the question'. The closest I came to a possible solution was a thin article on Nav and SPN's (located here if anybody wants to look at it http://blogs.msdn.com/b/nav_developer/a ... setup.aspx).

    Surely I'm not the only person out there who wants to connect to Nav web services from an external application and I must assume somebody much smarter than I has done this before.

    Thanks!
    -B-
  • ppavukppavuk Member Posts: 334
    I think webservice proxy is a answer. In this situation i would made aspx application which will consume webservice and publish results to outside. You then can run this application under domain credentials, which will resolve a security stuff, but you need to build own security system to prevent any unwanted connection to your application. As far as aspx application is nothing more that website you can use whatever standard IIS methods to deal with security.
  • MarijnMarijn Member Posts: 69
    Somewhile ago I made an experimental PHP web client using NAV webservices using it's own login mechanism, as well as Navision codeunits which can call other NAV webservices. That code is running locally so I am not sure about your network problem. But the HTTP login dialogue box popping up is something you can definitly get around. Of course. It really depends on the platform which you're calling from. I believe the HTTP credential information, the username and password, need somehow to be encapsulated in the SOAP request. There are all sorts of solutions out there.

    When calling NAV webservices from Navision, consider this incomplete piece of code (automation var: 'Microsoft XML, v6.0'.XMLHTTP)

    CREATE(xmlhttp, TRUE, TRUE);
    xmlhttp.open('POST', URL, FALSE, "Web Service Setup".Username, "Web Service Setup".Password);

    The last two OPTIONAL parameters are easily overlooked, but when given, they will suppress the HTTP authertication dialogue box. It took me while to find it :) You might want to change the boolean WebServicesUseNTLMAuthentication in the CustomConfig file in the Services folder to work with your calling client.
Sign In or Register to comment.