Search code examples
navision

Auto Kill Navision Webservice Session


I am using nav2013 r2 and using php and cURL we are reading some tables. I am able to successfully connect and read. As you may know navision has a limitation for simultaneously connected clients with regard to your licence.

So the problem arises as when i am not requesting any data the session remains alive and thus holding 1 of the licences active all the time.

I am killing the wrapper from php after i get my data but still the session remains there.

Is there another way to kill the session after finished reading or maybe after an amount of idle time? Remember i am talking about Web service client type not windows client type as windows client type are automatically disconnected when the user closes the client application.

Regards,

Edit: To connect i used this tutorial: https://blogs.msdn.microsoft.com/freddyk/2010/01/19/connecting-to-nav-web-services-from-php/


Solution

  • Here is a good blog post with deep details on license usage in NAV 2013 R2 +:

    http://dynamicsuser.net/nav/b/kine/posts/nav-2013-2015-session-counting

    When you make a WS call, session is created just for that call and is released immediatelly after. But according to the post, license that is allocated for that call holds for 2 hours (in case of Full license).

    You may switch the dedicated account for web service to limited user if possible. Also you may consider using one of other user accounts for web service calls - in this case, single user license should be shared between the NAV client and web service calls. (These are options from technical perspective only, and should be checked against the license agreement as well :)