Microsoft Dynamics 365 Blog

Lately we run into very strange problem. On Dynamics Ax Enterprise Portal which was installed on SharePoint 2010 user was not able to access Customers site. The user could log into Enterprise Portal and see other pages so the rights where correctly set up in Dynamics Ax as well in SharePoint (as given in Microsoft Dynamics AX Enterprise Portal Administration Guide). But still the Customers site was loading very long and in the end we got blank page.

In SharePoint logs (look also into View diagnostic logs (SharePoint Server 2010)) we could find error that we get time out:

11/19/2010 18:38:25.90 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://server/sites/DynamicsAx/Sales/Enterprise%20Portal/customers.aspx?WCMP=ceu) 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
11/19/2010 18:38:25.91 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/sites/DynamicsAx
6a3198da-7ccb-46e1-a636-b356c8fd9d6d 11/19/2010 18:38:25.91 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (PostResolveRequestCacheHandler). Execution Time=8.01777879590842 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
11/19/2010 18:38:26.02 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (WebPageTitleWebPart). Execution Time=110.600648965162 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
11/19/2010 18:38:27.39 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (AxUserControlWebPart). Execution Time=1351.28235571839 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
11/19/2010 18:38:28.52 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (Add WebParts). Execution Time=2622.62466319043 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
11/19/2010 18:41:13.95 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Runtime tkau Unexpected System.Web.HttpException: Request timed out. 6a3198da-7ccb-46e1-a636-b356c8fd9d6d 11/19/2010
18:41:13.95 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://server/sites/DynamicsAx/Sales/Enterprise%20Portal/customers.aspx?WCMP=ceu)). Execution Time=169685.486842602 6a3198da-7ccb-46e1-a636-b356c8fd9d6d

 

 

The issue was solved when user was added to Local Administrator group on SharePoint 2010 server. Of course such a solution is no solution as you cannot add all Enterprise Portal users to local admin group. But this gave us the an idea that it could be something with security settings and problems with accessing resources. We decided to do following steps:

1. Use Process Monitor Download Process Monitor http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

2. Run it on IIS Web server

3. Replicate the problem We fond out that user had no access to temporary directory

3:50:21.7602870 AM w3wp.exe 4136 CreateFile C:\Users\TEMP\AppData\Local\Temp\$tmp000d02ea.$$$ ACCESS DENIED Desired Access: Generic Read/Write, Delete, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Random Access, Delete On Close, Attributes: N, ShareMode: Delete, AllocationSize: 0, Impersonating: Domain\user

 

After adding the rights for user into folder C:\Users\TEMP\AppData\Local\Temp\ it worked fine on this environment  on the other environment we have to give access to different path. Basically when it needs to stream large data it needs to create a temp file, and the file is created in the context of the user requesting the data. The business connector will check if both the AXTMP and AXTEMP variables are present, if not, it tries to create a temporary file whereever the Windows TEMP variable is pointing to and web users will not necessarily have access to that path.

 

The solution in the end is to do the following.

The issue is happening because of Setup issue of Dynamics AX 2009. We need to set global environmental path should be defined for temporary files for Dynamics Ax:

(1) Create a folder on the Enterprise Portal Server on the file system (e.g, c:\AXTEMP)

(2) Set the NTFS permissions on this folder such that all AX Enterprise Portal users have FULL control to this folder.

(3) Go to Control Panel > System, and click on “Advanced system settings”

(4) In System Properties window, click on “Environment Variables…” button

(5) Create two system variables AXTMP and  AXTEMP and set the value to the folder created in Step (1)

(6) Do the above on all web front-ends hosting Enterprise Portal

 

(7) When convenient, restart IIS by running IIRESET.EXE /norestart on all web front-ends

 

–author: Czesława Langowska
–editor: Tariq Bell
–date: 22/Dec/2010
–last edited: 25/Nov/2011

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!