从网络路径运行 VSTO 应用程序时出错 CannotCreateCustomizationDomainException
环境:VS2008 .NET 3.5 - VSTO 运行时 3.0 - Excel 2007
我们已发布了对网络路径的 VSTO Excel 文档级自定义。我们的所有用户都能够将 .xltm 文件从网络位置复制到桌面(所有程序集仍在网络路径中),并能够在打开文件时运行自定义项。打开文件时,它会要求安装,用户安装并继续。效果很好。但是,所有这些用户都是其计算机的管理员。但是,有一种特殊情况。其中一名用户正在使用服务器计算机来使用这些自定义设置,但他不是该计算机的管理员。当他尝试打开 .xltm 文件时,出现错误
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException:
This document contains custom code that cannot be loaded because the
location is not in your trusted locations list: XXXX.XLTM. If you
trust this document you can save and open it from a location on your
computer. For more information, see
http://go.microsoft.com/fwlink/?LinkId=99104. at
Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifyDocumentIsTrusted(String
documentFullLocation, String documentName, OfficeVersion
officeVersion) at
Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String
solutionLocation, String manifestName, String documentName, Boolean
showUIDuri
我们将 \networkpath 和子文件夹添加到 Excel 受信任位置,启用了所有宏。但是,他仍然收到错误。我还将 file://networkpath
添加到 IE 中的受信任站点。还是没有运气。他仍然收到错误。
Environment: VS2008 .NET 3.5 - VSTO runtime 3.0 - Excel 2007
We have published the VSTO Excel document level customization to network path. All our users are able to copy the .xltm file from the network location to desktop(all the assemblies are still in networkpath) and able the run the customizations when the file is opened. When file is opened, it asks for install and user installs and proceed. It works fine. But, all these users are administrators to their machine. But, there is one special case. One of the user is using server machine to use these customizations and he is not an administrator on that machine. When he tries to open the .xltm file, he is getting error
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException:
This document contains custom code that cannot be loaded because the
location is not in your trusted locations list: XXXX.XLTM. If you
trust this document you can save and open it from a location on your
computer. For more information, see
http://go.microsoft.com/fwlink/?LinkId=99104. at
Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifyDocumentIsTrusted(String
documentFullLocation, String documentName, OfficeVersion
officeVersion) at
Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String
solutionLocation, String manifestName, String documentName, Boolean
showUIDuri
We added the \networkpath and subfolders to Excel trusted locations, enabled all macros. But, still he is getting the error. I also added the file://networkpath
to trusted sites in IE. Still no luck. Still he is getting the error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论