症状
AssetUrlSelector类,并且资源选取器对话框中 Microsoft SharePoint Server 2010 中返回的绝对 URL。 但是,用户希望接收的相对 URL。
解决方案
若要解决此问题,请安装以下更新汇总:
SharePoint 基础 2010年修补程序包 (osrchwfe x none.msp) 的描述: 2011 年 4 月 21 日
应用此修复程序包后,更改 SharePoint Server 2010 中的默认行为。 SharePoint Server 2010 立即返回而不是绝对 URL 相对 URL。 此外,如果在不同的 web 应用程序中为选定的链接,SharePoint Server 2010 仍返回绝对 URL。 但是,如果您想要还原的 SharePoint Server 2010 中的先前行为,将AssetPicker配置元素的returnAbsoluteUrl属性设置SharePoint部分向下,则返回 True。注意下面的代码演示此位于 web.config 文件中的部分。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><configuration> <configSections> <sectionGroup name="SharePoint">[…]<section name="AssetPicker" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </sectionGroup>[…] <SharePoint>[…]<AssetPicker returnAbsoluteUrl="true" /></SharePoint>[…]</configuration>
状态
Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。