Why am I getting a System.Security.Permissions.SecurityPermission error in my .NET Application?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 01:36:30

问题


I am trying to develop a text-to-speech editor in .NET 3.5 using C#. I encountered the following exception: System.Security.Permissions.SecurityPermission.

How to handle it?


回答1:


The system is saying that there has been an attempt to do something that is not allowed according to the current policy. More information is needed to give good advice here:

1) What is the full text of the exception message? There are a dozen or so situations that can cause a SecurityPermission so this is important. Specifically, there is a flag field that indicates the exact nature of the security violation.

2) What is the environment? Are the files stored locally, or on a network share? Apps run from a network share have always been partial-trust prior to 3.5 SP1. Do you have .NET 3.5 SP1 installed?



来源:https://stackoverflow.com/questions/552436/why-am-i-getting-a-system-security-permissions-securitypermission-error-in-my-n

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!