Tag Archives: 3002

You recieve a message from the web browser: “A script error has occurred” In NAV load balanced environment

I have stumbled upon this issue while configuring a Dynamics NAV 2015 Load Balanced solution combined with Forms Authentication.
In this scenario you will randomly get this error while browsing the NAV Web Client:

scripterror
“A script error has occurred, and the content cannot be displayed. Refresh the page or open a new browser window”

At the same time you will find an ASP.NET warning in the event log on one of the front servers saying:
“An error occurred processing a web or script resource request. The resource identifier failed to decrypt”

evlog

So what’s going on here?

Turns out that in order to work with forms authentication with NLB you need to configure Identical Machine Keys on both IIS servers that host your Dynamics NAV Web Client:

Solution:

1. Go to IIS on your first server and go to Machine Keys:

iismachinekey
2. Remove the check-box from both “Automatically Generate at runtime” options and then click Generate Keys.

iismachinekey2
3. Hit apply and copy both keys to notepad.
4. Go to IIS on your second server and paste the keys generated on the first server to the machine keys respectively.
5. Hit apply and do an IISRESET on both servers

This action should solve the script errors

Michael.