ASP.NET Web 应用程序中的 CAS 策略错误 [英] CAS Policy error in ASP.NET web Application

查看:35
本文介绍了ASP.NET Web 应用程序中的 CAS 策略错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 WEB 表单中使用 Devexpress 控件.我在添加控件时添加了对我的 refrences 文件夹的相应引用(我在这里使用网格)给我错误

I am using Devexpress controls in my WEb forms.I added the corresponding reference to my refrences folder while on adding the control (I am using grid here) gives me error

此方法显式使用 CAS 策略,该策略已被 .NET Framework 废弃.为了出于兼容性原因启用 CAS 策略,请使用 NetFx40_LegacySecurityPolicy 配置开关.请参阅 http://go.microsoft.com/fwlink/?LinkID=155570了解更多信息.

This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

我检查了解决方案

并按照链接中的说明更改了我的网络配置

and changed my web config as given in the link

但是我得到了同样的错误我使用的是 VS 2010,我的 .NET 框架是 4 并且我运行的是 32 位 OS XP

However I get the same error I am using VS 2010 and my .NET framework is 4 also I am running 32 bit OS XP

请帮忙

推荐答案

好吧,我之前遇到过这个错误我通过更改位于

Well I had this error earlier I solved it by changing my devenv.exe config file which is located at

[C:Program FilesMicrosoft Visual Studio 10.0Common7IDE][1](如果你的安装目录是C:)

[C:Program FilesMicrosoft Visual Studio 10.0Common7IDE][1](If your Installation directory is C:)

你需要做的是添加

     <runtime>
  <NetFx40_LegacySecurityPolicy enabled="true"/>
     </runtime>

在您的配置标签之间...这样您就可以解决您的问题但这引起了另一个问题......我在另一个项目中有一个数据集,我无法使用 Dataset Visualizer 检查.我遇到的错误是无法加载这个自定义查看器.经过数小时的谷歌搜索我发现了这个 Link1Link2

Between your Configuration tags...By this you would be able to resolve your problem But this gives rise to another problem...I had a dataset in another project which I could not inspect using Dataset Visualizer .The error I had was could not load this custom viewer.After hours of google search I found this Link1 and Link2

我尝试的另一个解决方案是更改为 webconfig 文件.我添加了此配置并且它在运行时工作,尽管我在设计时仍然遇到此错误.

Another solution I tried was changing to webconfig file .I added this configuration and it was working in run time although I still get this error in design time.

这篇关于ASP.NET Web 应用程序中的 CAS 策略错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆