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

查看:80
本文介绍了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

此方法显式使用.NET Framework已废弃的CAS策略。为了出于兼容性原因启用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 Framework是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

请帮助

推荐答案

我早些时候遇到过此错误
我通过更改我的 devenv.exe 配置文件(位于

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

[C:\Program Files\Microsoft Visual Studio 10.0\ \Common7\IDE] [1](如果您的安装目录为C:)

[C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE][1](If your Installation directory is C:)

您需要做的就是添加

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

在您的配置标签之间...这样您就可以解决您的问题
但是这引起了另一个问题...我在另一个项目中有一个数据集,无法使用Dataset Visualizer进行检查。我遇到的错误是无法加载此自定义查看器。我找到了 Link1 Link2

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天全站免登陆