Microsoft Dynamics GP Home Page scripting errors on Citrix XenApp
For the past 2 weeks I have been working on a fairly complex installation of Microsoft Dynamics GP for a hospitality staffing company whose hardware infrastructure is hosted by a very reputable provider. My client has made all their applications available to their end users via Citrix XenApp. Xenapp is Citrix Systems' secure on-demand application delivery platform for the Citrix Presentation Server.
After completing the installation of Microsoft Dynamics GP on the Citrix Servers, the next step was exposing the application to XenApp. This by all accounts is a fairly straightforward process. I logged into XenApp, launch Microsoft Dynamics GP and everything was working fine: home page, reports, SSRS reports, Business Analyzer, Management Reporter, the whole 9 yards!
A couple days later, users began reporting home page script errors as the one shown below:
Typically, if you follow the prescribed KB article 918313 - Frequently asked questions about the home pages and area pages features in Microsoft Dynamics GP, specifically Q21 and Q31 you end up understanding the following:
1. There must be a UserData folder under the %Appdata%\Microsoft\Internet Explorer folder. Under normal circumstances, this folder will get created when the user profile is first initiated.
2. You cannot roam user profiles and in particular the user Temp folders as this causes issues with Microsoft Dynamics GP.
We went through both questions - well, we went through all the questions - and realized that the UserData folder was not created for the end-users. Remember, I was not getting this error under my domain account, but I attribute this to the fact that I was a domain admin. Effectively, we setup the UserData folders, but the problem persisted.
I then went to the Run... command utility with my Windows account and typed %Appdata% and quickly realized that Windows Explorer was taking me to \\\UserData$\Appdata\ ..., in effect confirming that roaming profiles was active for all users on the domain.
This seems to contradict the previous point #2 above. However, this is where all hell broke lose with the infrastructure vendor. It turns out that disabling roaming profiles on a Citrix farm may cause all kinds of unpredictable results for other applications such as Microsoft Outlook which tend to lose personalized settings when bouncing between servers in the farm - this is a load balanced environment with 4 servers.
In short, disabling roaming profiles was not an option!
However, in working with the point Citrix and Windows engineer at the infrastructure provider and running some ProcMon traces, we realized that each time the home page attempted to load a file, ProcMon would display errors stating that the file location could not be found (effectively what the error was displaying even after the UserData folder was created). Since the profiles were being roamed this was disconcerting.
Of course, the immediate thought was, "it must be a permissions issue!". We then tested this theory by opening Windows Explorer and attempting to navigate to the Roaming Profile location with a standard user account. No luck!
The engineer quickly realized that the only way this could happen was via a Global Policy setting. In doing some more research, the likely candidate emerged: Remove Run Menu From Start Menu.
Clearly, from the policy description above, UNC paths are blocked and accessing local folders like \temp is a no, no (temp is roamed off to another server, remember?). Once we disabled the policy, Microsoft Dynamics GP started working like a charm and the errors were gone!
Now, you may say, "not sure we want to enable the Run commad for end-users". In my client's particular case, this made no difference because applications are being deployed via XenApp and not accessed from a desktop, so disabling the policy won't have any effect. At the end of the day, we all went home happy, which begs the question...
Can the above KB article be revised?
Until next post!
MG.-
Mariano Gomez, MVP
Edit 11/07/2017 - Added link to KB article 918313
After completing the installation of Microsoft Dynamics GP on the Citrix Servers, the next step was exposing the application to XenApp. This by all accounts is a fairly straightforward process. I logged into XenApp, launch Microsoft Dynamics GP and everything was working fine: home page, reports, SSRS reports, Business Analyzer, Management Reporter, the whole 9 yards!
A couple days later, users began reporting home page script errors as the one shown below:
Typically, if you follow the prescribed KB article 918313 - Frequently asked questions about the home pages and area pages features in Microsoft Dynamics GP, specifically Q21 and Q31 you end up understanding the following:
1. There must be a UserData folder under the %Appdata%\Microsoft\Internet Explorer folder. Under normal circumstances, this folder will get created when the user profile is first initiated.
2. You cannot roam user profiles and in particular the user Temp folders as this causes issues with Microsoft Dynamics GP.
We went through both questions - well, we went through all the questions - and realized that the UserData folder was not created for the end-users. Remember, I was not getting this error under my domain account, but I attribute this to the fact that I was a domain admin. Effectively, we setup the UserData folders, but the problem persisted.
I then went to the Run... command utility with my Windows account and typed %Appdata% and quickly realized that Windows Explorer was taking me to \\
This seems to contradict the previous point #2 above. However, this is where all hell broke lose with the infrastructure vendor. It turns out that disabling roaming profiles on a Citrix farm may cause all kinds of unpredictable results for other applications such as Microsoft Outlook which tend to lose personalized settings when bouncing between servers in the farm - this is a load balanced environment with 4 servers.
In short, disabling roaming profiles was not an option!
However, in working with the point Citrix and Windows engineer at the infrastructure provider and running some ProcMon traces, we realized that each time the home page attempted to load a file, ProcMon would display errors stating that the file location could not be found (effectively what the error was displaying even after the UserData folder was created). Since the profiles were being roamed this was disconcerting.
Of course, the immediate thought was, "it must be a permissions issue!". We then tested this theory by opening Windows Explorer and attempting to navigate to the Roaming Profile location with a standard user account. No luck!
The engineer quickly realized that the only way this could happen was via a Global Policy setting. In doing some more research, the likely candidate emerged: Remove Run Menu From Start Menu.
Clearly, from the policy description above, UNC paths are blocked and accessing local folders like \temp is a no, no (temp is roamed off to another server, remember?). Once we disabled the policy, Microsoft Dynamics GP started working like a charm and the errors were gone!
Now, you may say, "not sure we want to enable the Run commad for end-users". In my client's particular case, this made no difference because applications are being deployed via XenApp and not accessed from a desktop, so disabling the policy won't have any effect. At the end of the day, we all went home happy, which begs the question...
Can the above KB article be revised?
Until next post!
MG.-
Mariano Gomez, MVP
Edit 11/07/2017 - Added link to KB article 918313
Comments
I'm a happy guys :-)