在使用Sharepoint 2010上的AX2009企业门户时用户无法查看客户站点列表页面
最近我们碰到了个奇怪的问题。在使用Sharepoint 2010上的AX2009企业门户时用户无法查看客户站点列表页面。用户能够登陆企业门户并看到其它页面,因此AX和Sharepoint的权限设置是正确的(如 Microsoft Dynamics AX Enterprise Portal Administration Guide所述)。但是客户站点仍然加载了很长时间并最终显示空页面。
在Sharepoint日志中(参阅 View diagnostic logs (SharePoint Server 2010)),我们能够发现超时的错误:
11/19/2010 18:38:25.90 w3wp.exe (0x0EA8) 0x0A38 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:https://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:https://server/sites/DynamicsAx/Sales/Enterprise%20Portal/customers.aspx?WCMP=ceu)). Execution Time=169685.486842602 6a3198da-7ccb-46e1-a636-b356c8fd9d6d
当我们在Sharepoint 2010服务器上把用户加入本地管理员组后,问题得到了解决。当然如此的解决方案并不完美,因为您不可能把所有的企业门户用户加入本地管理员组。但是至少我们想到这个问题可能和安全设置以及访问资源的问题相关。我们决定采取以下步骤:
1.打开Process Monitor(下载https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx )
2.在IIS网络服务器上运行它
3.重现问题。我们发现用户没有权限访问临时目录
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
为该用户添加访问C:\Users\TEMP\AppData\Local\Temp\的权限后,问题在本机解决。在其它环境中我们需要添加访问不同路径的权限。
最终解决方案如下。
该问题的源头是AX2009的安装问题。我们需要为AX临时文件设置全局环境变量:
1.导航到环境变量窗口
2.创建AXTMP或者 AXTEMP,设置路径和完全控制权
3.因为上面的环境变量都没定义,系统默认使用TEMP,其值为%USERPROFILE%\AppData\Local\Temp。因此当Sharepoint运行时,它会尝试在管理员的临时文件夹中创建临时文件,而该文件夹对于非管理员用户来说是没有访问权限的。因此我们需要定义临时环境变量并指定临时文件的路径,同时将该文件夹的完全控制权赋予所有企业门户用户。
原文地址: