Version 1.3 and medium trust issue

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 年 前
I'm developing a version 1.3 site but after putting the site on the live server i'm getting the following error:

 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: That assembly does not allow partially trusted callers.

Source Error:

[No relevant source lines]


Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a366a079\34526c1d\App_Web_mxpqr9ng.7.cs    Line: 0

Stack Trace:

[SecurityException: That assembly does not allow partially trusted callers.]
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.dlRelatedProducts_ItemDataBound(Object sender, DataListItemEventArgs e) +0
   System.Web.UI.WebControls.DataListItemEventHandler.Invoke(Object sender, DataListItemEventArgs e) +0
   System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) +8670790
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +137
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +459
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +54
   System.Web.UI.WebControls.BaseDataList.DataBind() +55
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.BindData() +115
   NopSolutions.NopCommerce.Web.Modules.HomePageProductsControl.Page_Load(Object sender, EventArgs e) +80
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a366a079\34526c1d\App_Web_mxpqr9ng.7.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


I thought version 1.3 got rid of the medium trust issues ??
14 年 前
Sorted this issue now, I was referencing a Utility.dll that caused the security issue. I moved the code from the dll into the Utility class within the source code and recompiled.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.