Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I modify my settings to allow VS2010 to load 3rd party XSD files from the "Unauthorized Zone"?

I have opened a 3rd party XSD file in Visual Studio 2010 that imports namespaces from other schema files from the same 3rd party.

In the XML editor view of the schema file, the xs:import element is underlined with the following error: Request for the permission of type 'System.Security.Permissions.FileIOPermission', mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I read the following blog post: 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"?

like image 946
mrmcderm Avatar asked Jun 28 '10 16:06

mrmcderm


People also ask

What app opens XSD files?

You can open XSD files in Pattern Maker Viewer 4, Cross Stitch Saga, or Cross Stitch Paradise.

How do I import XSD files into Visual Studio?

You can easily just add an existing XSD on disk to your Visual Studio project by doing a "Add Existing Item" and then picking that file. There's no separate "import / export" functionality, really.


1 Answers

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 enter image description here

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

like image 69
AndyWilson Avatar answered Oct 02 '22 18:10

AndyWilson