2016-09-22 100 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

感謝您分享您的解決方案和經驗在這裏,很好的答案。你可以標記它。祝你今天愉快:) –