Hi there,
I am using LLBL Gen Pro version 2.6 final to access my MS SQL 2005 database.
When i run the website on my local machine it runs fine.
But when I uploaded it to a different host (who is running Medium Trust security) and try to run it I get a Security Exception.
Is there a way to use LLBL Gen Pro on Medium Trust security?
Perhaps one of the LLBL Gen Pro classes that I am importing is cause my app to throw this error?
If you have any advice I would appreciate it greatly.
Thanks in advance
-Nick
The error i get when I try access the data using my LLBL Gen Pro generated classes is as follows:
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.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
Line 21: protected void Page_Load(object sender, EventArgs e)
Line 22: {
Line 23: DynamicPageCollection pages = Collections.AllMenuPages(false);
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +58
System.Diagnostics.ListenerElementsCollection.GetRuntimeObject() +225
System.Diagnostics.TraceInternal.get_Listeners() +163
System.Diagnostics.TraceInternal.WriteLine(String message, String category) +108
System.Diagnostics.Trace.WriteLine(String message, String category) +4
SD.LLBLGen.Pro.ORMSupportClasses.CollectionCore1.Clear() +72
SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase
1.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, IPrefetchPath prefetchPathToUse, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) +23
SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase`1.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses) +27
Collections.AllMenuPages(Boolean isSecure) in D:\Nick\Projects\Gastro\trunk\Services\Collections.cs:348
Web_Default.Page_Load(Object sender, EventArgs e) in d:\www\binerodecepticon\web59734\gi-oncology2010.org\html\Web\Default.aspx.cs:23
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.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.web_default_aspx.ProcessRequest(HttpContext context) in App_Web_3rujfgn9.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75