2016-09-22 109 views
1

当VS 2015年为什么我会收到以下错误的Visual Studio 2015年调试XSL转换失败抛出:SecurityException

SecurityException 
----------------- 
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 

XSL generated a security exception. If you trust this stylesheet then copying it to your local hard drive will remove this security check. But it is highly advised that you review all script blocks and HTTP requests in the stylesheet before you do so. 

FirstPermissionThatFailed 

You can enable automatic downloads on the Miscellaneous XML Options page under the Text Editor category of the Tools/Options dialog.  

回答

0

我做了几件事情调试XSL和这个错误就走开了。

首先,我退出VS并通过右键点击启动图标重新打开,点击“更多” - >“以管理员身份运行”

这本身就可能已经足以解决这个问题,但我也没有为建议上述错误信息,并到VS菜单和点击

工具 - >选项 - >编辑 - 文本> XML->杂

下“网络”有勾选“自动下载DTD和模式”所以我会认为我会好的,因为我想下载一个文档(不是xsd或dtd,而是通过xsl文档函数的xml),但是,因为它在盒子被检查时不起作用,所以我没有选中(清除)盒子。

+0

感谢您分享您的解决方案和经验在这里,很好的答案。你可以标记它。祝你今天愉快:) –