我正在使用XSLTListViewWebPart和外部.xsl文件:
<xlslink>my.xls</xlslink>
授权访问一切正常,但如果我尝试匿名重复此操作,我会收到错误:
Error while executing web part: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.SharePoint.Library.SPRequest.UpdateWebPartCache(String bstrWebUrl, Boolean bAllUsers, String bstrID, Byte[]& ppsaData, Boolean fOMCall)
at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CacheWriteInternal(Guid storageKey, Byte[] cacheData, Storage storage, Boolean omCall)
at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.get_CustomizedXsl()
at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)
这是SharePoint的错误吗?
答案 0 :(得分:2)
这是一个SharePoint错误。 SharePoint进行一次转换并缓存它,这是一个缓存问题。请看这篇文章了解更多详情:
答案 1 :(得分:0)
通过使用DataFormWebPart而不是ListViewWebPart,我能够解决这个问题。然后可以以相同的方式使用XSLT文件,似乎没有与缓存相关的问题。