0

我删除并重新创建了 ASP.Net 站点的子域。然后我上传了文件,但是当我打开浏览器时,我得到一个安全异常,指出我必须修改应用程序的配置文件以授予信任。遗憾的是,错误消息没有说明导致问题的文件、存在问题的信任或我能看到的任何内容。

这是我看到的:

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 for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error: 


[No relevant source lines]

Source File: App_Web_iqeawexe.0.cs    Line: 0 

Stack Trace: 


[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
   System.Security.CodeAccessPermission.Demand() +46
   System.Reflection.RuntimeAssembly.VerifyCodeBaseDiscovery(String codeBase) +118
   System.Reflection.RuntimeAssembly.GetName(Boolean copiedName) +69
   System.Reflection.Assembly.GetName() +12
   DevExpress.Web.ASPxClasses.Internal.HttpUtils.<get_DXValidatorType>b__0(Assembly i) +9
   System.Linq.WhereArrayIterator`1.MoveNext() +55
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +4216052
   DevExpress.Web.ASPxClasses.Internal.HttpUtils.get_DXValidatorType() +120
   DevExpress.Web.ASPxClasses.Internal.HttpUtils.GetValueFromRequest(HttpRequest request, String key, Boolean skipValidation) +25
   DevExpress.Web.ASPxClasses.Internal.HttpUtils.GetValueFromRequest(String key, Boolean skipValidation) +60
   DevExpress.Web.ASPxClasses.Internal.MvcUtils.get_CallbackName() +79
   DevExpress.Web.ASPxClasses.Internal.RenderUtils.IsAnyCallback(Page page) +51
   DevExpress.Web.ASPxClasses.Internal.ResourceRegistrator.EnsureResourcesSynchronized(Page page) +55
   DevExpress.Web.ASPxClasses.Internal.ResourceRegistrator.RegisterResource(Page page, ResourceData resource, Boolean useStandardRegistration) +19
   DevExpress.Web.ASPxClasses.ASPxWebControl.RegisterHoverIncludeScripts() +84
   DevExpress.Web.ASPxClasses.ASPxWebControl.RegisterClientIncludeScripts() +72
   DevExpress.Web.ASPxClasses.ASPxWebControl.OnPreRender(EventArgs e) +96
   DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.OnPreRender(EventArgs e) +32
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_iqeawexe.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

想法?

4

1 回答 1

0

这个问题原来是 DevExpress 版本中的一个缺陷。7 月 8 日发布的版本破坏了使用中等信任模型的网站。他们发布了一个修补程序。

以下是 DevExpress 写给我的内容:“在中等信任环境票证中更新到 DevExpress 2013.1.5 后,我们已经在 System.Security.Permissions.FileIOPermission 异常的上下文中修复了这个问题。我建议你下载一个修复程序并检查是否或者问题是否仍然存在。”

我没想到一家大公司不会进行彻底的测试,这就是让这个 bug 难以追踪的原因。

于 2013-07-16T18:23:40.320 回答