Tonight I had an issue with a NAV server that failed to start with the next error message:
Server instance: DynamicsNAV71
The service MicrosoftDynamicsNavServer$DynamicsNAV71 failed to start. This could be caused by a configuration error. Detailed error information:System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:7047/DynamicsNAV71/. Another application has already registered this URL with HTTP.SYS. —> System.Net.HttpListenerException: Failed to listen on prefix ‘http://+:7047/DynamicsNAV71/‘ because it conflicts with an existing registration on the machine.
The problem is that there can be different situations that lead to this error. In my case I was playing around with SSL certificates and switched SSL on web services on and off. After some investigation I found out that there was a URL registration done for https with port number 7047. Obviously, it is not possible to register a URL with the same port number, but with different protocols (http vs. https). And for some reason that I don’t know, the NAV Administration Management Console didn’t clean up the URL registrations.
To find out what the registered URL’s are, use the following command at a command prompt:
netsh http show urlacl
This command gives a list of registered URL’s as shown in the next picture. (This list is longer than shown here.)
Notice the https prefix in the URL.
The solution for this error is to manually recreate the URL registration. This can be done by first deleting the registered URL’s and then register the correct URL.
To delete these registered URL’s use the following command:
netsh http delete urlacl url=https://+:7047/DynamicsNAV71/
Repeat this for each URL that causes a problem (here both with port 7047 and 7048).
By the way: if you now try to start the NAV service, you will get an access denied error: HTTP could not register URL http://+:7047/DynamicsNAV71/. Your process does not have access rights to this namespace.
Registering the URL again is needed to get the service up and running. This can be achieved with the following command:
netsh http add urlacl url=http://+:7047/DynamicsNAV71/ user= “NT AUTHORITY\NETWORK SERVICE” listen=yes delegate=no sddl=”D:(A;;GX;;;NS)”
Now the NAV service will start succesfully!
More information about the Netsh commands for HTTP can be found here: