关于ASPxGauges安全性问题 [英] About ASPxGauges Secutity Problem

查看:90
本文介绍了关于ASPxGauges安全性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在项目中添加了一些AspxGauges,这是一个问题.我设置了自定义的Gauge控件,并将其另存为XML.页面加载如下:

Hello guys,

There is a problem that I added a few AspxGauges to my project. I set the customize Gauge control and save them out as XML. The page load is below:

protected void Page_Load(object sender, EventArgs e)
{
                this.gauges_yil.RestoreLayoutFromXml(MapPath("~/aspx/gauges_yil.xml"));
                this.gauges_m2.RestoreLayoutFromXml(MapPath("~/aspx/gauges_m2.xml"));
                this.gauges_kasa.RestoreLayoutFromXml(MapPath("~/aspx/gauges_kasa.xml"));
                this.ASPxGaugeControl4.RestoreLayoutFromXml(MapPath("~/aspx/ASPxGaugeControl4.xml"));
                this.ASPxGaugeControl5.RestoreLayoutFromXml(MapPath("~/aspx/ASPxGaugeControl5.xml"));
                this.ASPxGaugeControl6.RestoreLayoutFromXml(MapPath("~/aspx/ASPxGaugeControl6.xml"));
                
}



但是,在将其发送到服务器后出现了此错误:




However, I got this error after I sent it to the server:


Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
 
Exception Details: System.Security.SecurityException: Request failed.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
[SecurityException: Request failed.]
DevExpress.XtraGauges.Core.Resources.PointF2DConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType) +0
System.Web.Compilation.CodeDomUtility.GenerateExpressionForValue(PropertyInfo propertyInfo, Object value, Type valueType) +587
System.Web.UI.SimplePropertyEntry.GetCodeStatement(BaseTemplateCodeDomTreeGenerator generator, CodeExpression ctrlRefExpr) +136



如果有人可以帮助我,请告诉我...

问候

Haluk



If somebody can help me, pls let me know...

Regards

Haluk

推荐答案

错误看起来很容易理解:应用程序尝试执行安全策略不允许的操作.要授予此应用程序所需的权限,请联系您的系统管理员或在配置文件中更改应用程序的信任级别.

您似乎没有权限在服务器上保存文件.
看看是否有帮助: FIX:如何解决安全异常(ASP.NET)? [ MSDN:ASP.NET信任级别和策略文件 [ MSDN:如何:使用代码访问安全策略约束程序集 [
Error looks self explanatory: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application''s trust level in the configuration file.

Looks like you don''t have permission to save file on server.
See if this helps: FIX: How to resolve Security Exception (ASP.NET)?[^]


Additional few links on how to handle security at higher levels:
MSDN: ASP.NET Trust Levels and Policy Files[^]
MSDN: How To: Use Code Access Security Policy to Constrain an Assembly[^]


感谢Sandeep Mewara ...我会设法弄清楚...
Thanks Sandeep Mewara... I''ll try to figure out about it...


这篇关于关于ASPxGauges安全性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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