Monthly Archives: October 2014

Net.TCP Port Sharing: Dynamics NAV 2015 and Azure

If you come from the Dynamics NAV community you probably have seen the blog post from one of my favorite bloggers: Port Sharing with NAV2013. This blog describes in detail on how to set up port sharing to several NAV service tiers (NST).

So what is new then? If you run the 1VM/2VM script it will by default install a NST service with a local user account instead of using one of the system accounts. So if you follow Waldo´s instructions on how activate port sharing you will get an error like this:

The service MicrosoftDynamicsNavServer$DynamicsNAV80_Instance1 failed to start. This could be caused by a configuration error. Detailed error information:System.ServiceModel.CommunicationException: The service endpoint failed to listen on the URI ‘net.tcp://SERVERNAME:9001/DynamicsNAV80_Instance1/Service’ because access was denied. Verify that the current user is granted access in the appropriate allowAccounts section of SMSvcHost.exe.config. —> System.ComponentModel.Win32Exception: Access is denied
at System.ServiceModel.Activation.SharedMemory.Read(String name, String& content)

Read the rest of this entry »

1 Comment

Posted by on 2014-10-27 in Okategoriserade


Tags: , , , ,

Azure Get-AzureSubscription: Same SubscriptionName And Blank SubscriptionID

I was going to set up a new azure environment for a new customer with a powershell script when I encountered the following error:

Get-AzureVNetConfig : Value cannot be null.
Parametername: subscriptionId
At line:1 char:1
+ Get-AzureVNetConfig
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AzureVNetConfig], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVNetConfigCommand

It seems that I was too quick to start with the new environment. I had forgotten to download the latest publishsettings file which contains the new customer subscription.

What instead happened now was that it created a new subscription named “CUSTOMERNAME” with SubscriptionID blank.

Read the rest of this entry »

Leave a comment

Posted by on 2014-10-25 in Okategoriserade


Tags: ,

Dynamics NAV ClickOnce: Install 2013/2015 Help Server

One of the less good things with the 1VM/2VM script is that it doesn’t install a NAV help server.

So in order to get the help server to work with the newly installed ClickOnce client in your Azure environment you have to do the following things:

  1. Install the help server from the NAV DVD on the current machine
  2. Add the help server URL to ClientUserSettings.config in the ClickOnce folder
  3. Add an endpoint to the Azure VM in the Azure portal
  4. Update the ClickOnce deployment

Read the rest of this entry »

1 Comment

Posted by on 2014-10-18 in Okategoriserade


Tags: , , ,

Dynamics NAV ClickOnce: “File, FILENAME application identity.manifest, has a different computed hash than specified in manifest.”

Ok, you have probably landed here because you are trying to update your ClickOnce deployment but gets the error “application identity.manifest, has a different computed hash than specified in manifest.” .

In my case the reason was that I had done the wrong order when building the deployment.

Read the rest of this entry »


Posted by on 2014-10-18 in Okategoriserade


Tags: , ,

Dynamics NAV Role Center: Wrong Language In Profile

We had this customer where the role centers/profiles seemed messed up. The language was in swenglish, a combination of both swedish and english.


First I thought this was a another bieffect of cumulative update 8 to Dynamics NAV 2013 R2 were Microsoft screwed and missed and wrote over several local language captions. Affected countries are Sweden, Norway, Denmark, Germany and perhaps some more. Hopefully they will fix it to cumulative update 12. Anyway, I checked it and this wasn’t the fault so I did what every smart person does. I googled it.  Trying to find some information by googling phrases like:

Wrong language in the ribbon

Profile with wrong language

Role center language problem

But I came up very short. When I investigated the issue further I noticed that the faulty captions couldn’t be changed in either pages or menuitems. I then realised that the language must be like the charts, it is localized and is found in a blob somewhere. I found How to:Export or Import Profiles on msdn. By exporting it to a XML file and open it I could verify that I have found the source to my language problem.

So why did we have faulty language version? I realised that the cronus database we were using didn’t come from a swedish installation but came from our add-on partner which had used a W1 version. Why did they use a W1? Well, it is an international addon and it is always easier to demo and maintain a version in W1 then maintaining it in other languages.

The solution is export all the profiles from a swedish cronus and then import them into the target database. I calculated the profiles to be ~25 so it would take some time to export/import them all since you can only do it one by one. But since I like automation I instead created a tool that exports all the profiles and imports them all at once. If you are interested in having it, comment and I’ll maybe publish the code in a blog post.

Leave a comment

Posted by on 2014-10-07 in Okategoriserade


Tags: , ,

Dynamics NAV Performance: Record Data Operations

NAV has come very far as product and it has changed a lot over time and the big question today is, do you change with it or do you code like it is 1990? 🙂

When we were using native databases we used find(‘-‘) to find a record set. When SQL arrived we instead used findfirst because it was much faster. But what should we use nowadays?

I have created a function to measure all the record operations in a 2009 R2 SQL environment and in a 2013 R2.

Here is an example of the measuring code:

InitTime := TIME;
  GLEntry.SETRANGE("G/L Account No.",'2645');
FindSetDuration := TIME - InitTime;

Lets take a look at the result in Dynamics NAV 2009 R2 (SQL):


Here are no big surprises. Find(‘-‘) is not the fastest operation anymore since the switch from native to sql database. Findfirst is the fastest operation and is good to use if you just want to see if a record set is empty or not.

Lets take a look at the result in 2013 R2:


If you start by comparing the overall times with the 2009 you can see major difference. Both tests have been run on the same machine, same and yet the 2013 R2 version is almost twice as fast as the 2009!

The next big surprise is IsEmpty. In 2009 R2 this was the slowest operation, in 2013 R2 this is the fastest operation!

What can we learn from this? If we want to optimize your code from a SQL perspective we should use IsEmpty instead of findfirst whenever we need to check if a record set is empty or not. For instance:

If findfirst then begin
     //Do stuff
  Until next = 0;

Should now instead be:

If Not IsEmpty then begin
     //Do stuff
  Until next = 0;

Posted by on 2014-10-07 in Okategoriserade


Tags: ,

Stefan Maroń

Dynamics 365 Business Central

James Pearson

Thoughts about Dynamics 365 Business Central, Git, Azure DevOps, PowerShell, Automated Testing, Visual Studio Code...and maybe some other stuff

Roberto Stefanetti BLOG

MVP & MCT Business Central, Powershell, Azure, SQL Server


DevOps starts with culture!

Comments for DevOps ABCs Blog

Reflections from the ERP field

DevOps ABCs Blog

Reflections from the ERP field

Dynamics 365 Business Central for Partners

Reflections from the ERP field

Freddys blog

Learn something new... - then Teach someone!

Stefano Demiliani Technical Blog

Reflections from the ERP field

David Worthington's NAV Performance Blog

Micosoft Dynamics NAV Performance Testing & Optimization

Freddys Blog

Reflections from the ERP field

Marije Brummel Blog | Business Central, Azure and more...

Design Patterns, Performance, Clean Code

Ideas in the cloud

Goprowe AB

Reflections from the ERP field


Reflections from the ERP field

The NAV Viking´s Blog

- Sharing my experience in the Dynamics NAV world

Comments for

Reflections from the ERP field

Nav Can Be Fun

Its Really Fun to Work with Microsoft Dynamics Nav / D365 Business Central


Reflections from the ERP field