已经解决:
搜索到这个链接,需要创建code group然后设置权限。
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/f7031de3-fa5a-45c1-8518-25cad7653444。
设置过程参考:
http://blogs.msdn.com/shawnfa/archive/2003/06/20/57023.aspx。讲解的很详细.
The easiest way to modify your security policy is by using the Microsoft .NET Framework Configuration utility from the control panel. You can also run this tool from the command line by running mscorcfg.msc.
- Expand the Runtime Security Policy folder
- Expand the Machine policy level
- Expand the Code Groups folder
To modify the polcy to trust a specific strong name:
- Right click on All_Code, and select New
- Create a new code group for your strong name, and hit next
- Select a strong name membership condition from the drop down box
- Hit the import button, and select your assembly. The configuration tool will import your public key. If you want to trust everything you sign with this key, leave the name and version boxes unchecked
- Select the FullTrust permission set
To modify the policy to allow full trust for all Intranet assemblies:
- Expand the All_Code code group
- Right click the LocalIntranet_Zone code group, and select properties
- Switch to the Permission Set tab, and select FullTrust
按照这个步骤来就可以解决问。
Frank Xu Lei--谦卑若愚,好学若饥
专注于.NET平台下分布式应用系统开发和企业应用系统集成
Focus on Distributed Applications Development and EAI based on .NET
欢迎访问老徐的中文技术博客:
Welcome to My Chinese Technical Blog
欢迎访问微软WCF中文技术论坛:
Welcome to Microsoft Chinese WCF Forum
欢迎访问微软WCF英文技术论坛:
Welcome to Microsoft English WCF Forum