NotesforGallery gives an error when I load a page using it to a live site
Hi
I have included a NotesforGallery in one of the pages on a simple website and it works just fine on my test system
When I load the page to the live server I get the following error when the page is accessed:
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:
Line
34: </p>
Line
35:
Line 36: <ctl:Gallery
runat="server" ID="Gallery1"
FolderUrl="~/Images/FashionsGallery/Girls"
Size="100" FadeSpeed="200"/>
Depending on where he got the
“NotesForGallery.dll” assembly – it may be trying to do something in the code
which requires full trust (things like IO on the filesystem, registry access
etc)
Unforunately, without seeing the
code I couldn’t say for certain what the problem is (the stack trace doesn’t
show much).
So, I guess that notesforgallery requires full trust? In fact I seem to remember someone telling me this during a conversation but cannot remember the details.
Is there a way to configure NotesforGallery to get round this or have I got to find a different galley :( that will work in
I have found this reference
We recommend that all assemblies registered in SQL Server, except those
assemblies added to the global assembly cache, be marked with the AllowPartiallyTrustedCallers attribute so that assemblies loaded by SQL Server can access each other.
but it doesn't help much as I don't really see how I can implement it?
NotesforGallery gives an error when I load a page using it to a live site
Hi
I have included a NotesforGallery in one of the pages on a simple website and it works just fine on my test system
When I load the page to the live server I get the following error when the page is accessed:
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:
Line 34: </p>
Line 35:
Line 36: <ctl:Gallery runat="server" ID="Gallery1" FolderUrl="~/Images/FashionsGallery/Girls" Size="100" FadeSpeed="200"/>
Line 37:
Line 38: </div>
Source File: \\fs1-n02\stor2wc1dfw1\373232\373350\www.clovahaslemere.co.uk\web\content\Fashions.aspx Line: 36
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
ASP.fashions_aspx.__BuildControlGallery1() in \\fs1-n02\stor2wc1dfw1\373232\373350\www.clovahaslemere.co.uk\web\content\Fashions.aspx:36
ASP.fashions_aspx.__BuildControlContent3(Control __ctrl) in \\fs1-n02\stor2wc1dfw1\373232\373350\www.clovahaslemere.co.uk\web\content\Fashions.aspx:18
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
ASP.masterpages_master1_master.__BuildControlMainColumn() +117
ASP.masterpages_master1_master.__BuildControlform1() +297
ASP.masterpages_master1_master.__BuildControlTree(masterpages_master1_master __ctrl) +107
ASP.masterpages_master1_master.FrameworkInitialize() +46
System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8672863
System.Web.UI.Page.get_Master() +51
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
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.fashions_aspx.ProcessRequest(HttpContext context) +37
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
I got this response from a query to the ISP:
Depending on where he got the “NotesForGallery.dll” assembly – it may be trying to do something in the code which requires full trust (things like IO on the filesystem, registry access etc)
Unforunately, without seeing the code I couldn’t say for certain what the problem is (the stack trace doesn’t show much).
So, I guess that notesforgallery requires full trust? In fact I seem to remember someone telling me this during a conversation but cannot remember the details.
Is there a way to configure NotesforGallery to get round this or have I got to find a different galley :( that will work in
I have found this reference
We recommend that all assemblies registered in SQL Server, except those assemblies added to the global assembly cache, be marked with the AllowPartiallyTrustedCallers attribute so that assemblies loaded by SQL Server can access each other.
but it doesn't help much as I don't really see how I can implement it?
OOOOPS! This isn't an Umbraco site ------- sorry all! Thought I had converted it but it is a straight asp.net site :(
But if anyone has any ideas anyway :)
is working on a reply...