visual studio 2015 调试 xsl 转换失败 SecurityException
visual studio 2015 debugging xsl transformation failed SecurityException
在 vs 2015 中调试 xsl 为什么会出现以下错误
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.
我做了几件事,这个错误消失了。
首先,我退出VS并通过右键单击启动图标重新打开,单击'more'->'run as administrator'
仅此一项可能就足以解决问题,但我也按照上面的错误消息建议进行操作,然后转到 VS 菜单并单击
工具->选项->文本编辑器->xml->杂项
在 'network' 下有一个 'Automatically download dtds and schemas' 中的复选标记所以我认为我可以下载文档(不是 xsd 或 dtd,而是 xml 通过 xsl 文档功能)但是,由于选中该框时它不起作用,我取消选中(清除)该框。
我之前的回答有时有效。然而,根本原因是 visual studio,如果您将项目作为网站解决方案打开,则没有授予文档功能获取文档的权限。如果您以文件夹模式打开您的 xsl 文件,您将拥有除 https 提取之外的最大安全权限。
在 vs 2015 中调试 xsl 为什么会出现以下错误
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.
我做了几件事,这个错误消失了。
首先,我退出VS并通过右键单击启动图标重新打开,单击'more'->'run as administrator'
仅此一项可能就足以解决问题,但我也按照上面的错误消息建议进行操作,然后转到 VS 菜单并单击
工具->选项->文本编辑器->xml->杂项
在 'network' 下有一个 'Automatically download dtds and schemas' 中的复选标记所以我认为我可以下载文档(不是 xsd 或 dtd,而是 xml 通过 xsl 文档功能)但是,由于选中该框时它不起作用,我取消选中(清除)该框。
我之前的回答有时有效。然而,根本原因是 visual studio,如果您将项目作为网站解决方案打开,则没有授予文档功能获取文档的权限。如果您以文件夹模式打开您的 xsl 文件,您将拥有除 https 提取之外的最大安全权限。