Port Sharing with NAV2013

As you might know, installing NAV2009 isn’t painless. Or at least .. that’s my idea of it. The NAV-typical “beauty of simplicity” is hard to find… you have to do quite a lot to have it successfully installed:

  • Use service accounts
  • Set up delegation / registering SPN’s
  • Handle the Query Notification
  • ….

What I always liked about how we are able to set it up, is the fact that we are able to use instance names!

Some history

For months, we had been installing databases and NST’s for our development environments internally, and we had been installing all NST’s with separate port names. What was that all about? You can imagine we were keeping and managinglists, like:

Customer A Server:8943/DynamicsNAV
Customer B Server:7089/DynamicsNAV
Customer C Server:8877/DynamicsNAV

Same situation at our first customers, where we always install 3 environments, which we call: QA, LIVE, TRAINING. For every customer, we had to point them to url’s, like:

QA Server:7048/DynamicsNAV
LIVE Server:7046/DynamicsNAV
TRAINING Server:7050/DynamicsNAV

There is obviously something very wrong in this way of installing NST’s. First of all, we’re able to provide instancenames in the CustomsSettings.config:

So we decided to turn things around, and:

  • Always use the same, default ports
  • Always give a significant meaning to the Instance name

This made our internal NST connection strings look like:

Customer A DEVServer:7046/NameOfCustomerA
Customer B DEVServer:7046/NameOfCustomerB
Customer C DEVServer:7046/NameOfCustomerC

And at the customer:

QA Server:7046/QA
LIVE Server:7046/LIVE

I’m sure you agree that this (and only this) makes sense .. and the first situation didn’t. The only problem is .. It needed some setup.

Port Sharing

It’s all about sharing ports, and distinguish your services with a unique instance name. Sharing ports is not configured by default, and is actually enabled by starting (and setting up as “Automatic”) the “NetTcpPortSharing” service:

If this isn’t running, none of it all will work.

Furthermore, NAV 2009 and NAV 2013 aren’t configured as being shared at all. This involves some manual configuring..

Let’s now focus on the NAV2013-part (you most probably figured out how to do all this in NAV2009 anyway ;°)).

What happens when you’re using the Microsoft Dynamics NAV Administration tool?

This tool rocks. This tool is what we missed with NAV2009, right? :-). Well, like I explained above, I would like to be able to set up extra service tiers on my machine, sharing the same 4 ports (7045..7048), but having other instance names. Having an advanced Administration tool like this, will do all tricks, I guess … .

First thing I do is “Add Instance” in the Admin tool, and complete the necessary fields like I would like to use it:

I’m not caring about the account right now, because that’s beside the point of the blogpost.. . Normally, I would always use a service account, just because of “best practices” of installing and running services on multiple tiers… .

Note that I’m already running a default installation-instance, called “DynamicsNAV70”.

After the install, you’ll see the added instance, and you think all is fine:

(note, the other services are NAV2009 services on my machine)

Until you’re trying to start the service. You’ll see this error message popping up:

And when you’re checking the log, it actually says that the Port isn’t shared.

Well, it’s actually no hocus pocus .. . Starting the NetTCPPortSharing service isn’t enough .. I also have to change the service-configuration for using NetTCPPortSharing, the default instance that came with the setup DVD, is not sharing its port, thus claiming it, which makes it impossible for my second server to also use the default ports.

Make sure all services use NetTCPPortSharing

Well, this will involve some small steps:

  1. First search for the Service name in the properties of the service where you want to configure Port Sharing
  2. Open a cmd shell and type the following command:

    sc config MicrosoftDynamicsNavServer$Waldo_Demo_2013 depend= NetTcpPortSharing/HTTP

  3. Do this for all services that are actually trying to use those ports.

Afterwards, restart the services. You can do that using the Dynamics NAV Admin Tool again. Off you go!

Is that all?

Not exactly. When you’re using a dedicated service account, things might become a slight more difficult.

But I’ll keep that for coming blogs… (as this hasn’t anything to do with portsharing..).

5.00 avg. rating (98% score) - 3 votes

Permanent link to this article: https://www.waldo.be/2012/10/17/port-sharing-with-nav2013/


3 pings

Skip to comment form

  1. There’s a couple of formatting oddities on this page in Chrome in Win8. Not sure what other browser/OS combos are seeing it.

  2. Better? :-).

    don’t know what it was .. . I imported this using an RSS feed .. probably something went wrong.

    thanks for letting me know!

    • Zoe on October 15, 2014 at 8:24 am
    • Reply


    Is there a maximum number of NST’s that we can put up on 1 port?

    Are there any consequences if we install a large number of NST’s on 1 port?


      • waldo on October 15, 2014 at 11:14 am

      Hey ex-colleague 🙂
      Know that it’s not supported by default. But in my knowledge, there is no limit. We have about 80 on one port for our development servers.. .

    • kriki on October 21, 2014 at 3:34 pm
    • Reply

    I have over 40 in a development server. No problem (except that the servicetier server needs a lot of memory for all those servicetiers)

  3. Hey,
    “When you’re using a dedicated service account, things might become a slight more difficult.”
    Can I have more details, I am very interesting to implement that port sharing.

      • waldo on October 30, 2015 at 4:16 pm

      May be this one helps?

    • Kevin on February 22, 2017 at 11:28 am
    • Reply

    If I understood right from TechDays 2016, Microsoft advises against using portsharing now, is that correct?
    >> It is a lot more convenient than 325 different ports for NAV…

      • waldo on February 22, 2017 at 12:07 pm

      I never had any issues with it .. but I still don’t do it at the customer’s site (production). I do however share everything on our side (parter – DEV environments).

  4. Correct for production.
    In house for development, you can use portsharing without problems. I know Waldo is doing it and I also have been doing it. Never had any problems.
    One thing though to keep in mind:
    You can’t mix NAV2009 services with NAV2013+ services for portsharing. They are not compatible.
    But you can use portsharing between NAV2013,R2,2015,2016,2017 without problems.

      • Kevin on February 22, 2017 at 12:54 pm

      Must say I did use this at various customers in the past (on NAV 2013).
      Always thought different port numbers for different version was convenient somehow.

      At the moment, working on setting up a NAV 2017 CU 3 environment, and will use it then for the DTA-part of DTAP 😉

      • kriki on February 22, 2017 at 3:11 pm

      Having multiple port numbers makes live more complicated. When creating a new service, you need to find a new port number. Not worth it for DEV/TEST. But best done in production environments because MS says so.

  1. […] might my previous post about Dynamics NAV deployments and sharing ports. If you didn’t read the post, please do so, so you know how to do it in the first […]

  2. […] might have read my previous post about Dynamics NAV deployments and sharing ports. If you didn’t read the post, please do so, so you know how to do it in the first […]

  3. […] quoting Waldo from his previous blog, “When you’re using a dedicated service account, things might become a slight more […]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.