如何修改我的设置以允许VS2010从“未授权区域"加载第三方XSD文件? [英] How do I modify my settings to allow VS2010 to load 3rd party XSD files from the "Unauthorized Zone"?

查看:144
本文介绍了如何修改我的设置以允许VS2010从“未授权区域"加载第三方XSD文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Visual Studio 2010中打开了一个第三方XSD文件,该文件从同一个第三方的其他架构文件中导入了命名空间.

在模式文件的XML编辑器视图中,在xs:import元素下划线并带有以下错误:请求类型为'System.Security.Permissions.FileIOPermission'的权限,mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089"失败.

我阅读了以下博客文章:

我的问题是-如何更改安全设置以允许引用这些架构,或者我可以做些什么使与它们关联的架构和名称空间受信任"?

本人已遇到此问题-实际上是因为Win 7阻止了架构文件,因为它们是从网络位置复制进来的.

要取消阻止单个文件,请导航至该文件,然后使用属性">取消阻止"

对于多个文件,使用Sysinternals的流来批量更改位置最快,如http://blogs.msdn.com/b/xmlteam/archive/2009/06/04/understanding-xml-schema-sets-in-the-xsd-designer.aspx which states that it's a security zone violation and Visual Studio places the schemas in the "Unauthorized zone" in the XML Schema Explorer.

My question is - how do I change my security settings to allow these schemas to be referenced, or is there something I can do to make the schemas and namespaces associated with them "trusted"?

解决方案

Had this issue myself - it was actually because Win 7 had blocked the schema files due to them being copied in from a network location.

To unblock individual files navigate to the file and use Properties > Unblock

For multiple files it's quickest to use Sysinternals' Streams to bulk change the location as described in this blog post.

这篇关于如何修改我的设置以允许VS2010从“未授权区域"加载第三方XSD文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆