Project

Profile

Help

SecurityException: partially trusted callers

Added by Anonymous over 14 years ago

Legacy ID: #7578973 Legacy Poster: Lea Hayes (numberkruncher)

I am trying to upload a Saxon enabled page to my ASP.NET website which is a shared hosting package from FastHosts. When the page is viewed I am getting the exception message that is listed below. The troublesome page: http://www.rotorz.net/test.aspx How can I get around this problem? Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. Stack Trace: [SecurityException: That assembly does not allow partially trusted callers.] test.Page_Load(Object sender, EventArgs e) +0 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.test_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Replies (5)

Please register to reply

RE: SecurityException: partially trusted callers - Added by Anonymous over 14 years ago

Legacy ID: #7579907 Legacy Poster: Michael Kay (mhkay)

You might find this thread helpful. It's the first one I found on google, there are many others similar: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/d2ed2b53-6598-45fc-8600-a141720a67b5

RE: SecurityException: partially trusted call - Added by Anonymous over 14 years ago

Legacy ID: #7582718 Legacy Poster: Lea Hayes (numberkruncher)

I have contacted FastHosts regarding this problem, but they are refusing to budge and change the security settings on the server. They said that there should be a way to solve this problem within the source code, if I have access to it. Do you know what sort of thing I should be looking for? Could it be the IKVM dependency of Saxon?

RE: SecurityException: partially trusted call - Added by Anonymous over 14 years ago

Legacy ID: #7582777 Legacy Poster: Michael Kay (mhkay)

I'm sorry, I'm no expert on the .NET security model. The Saxon DLL is a strong-named assembly and should normally be installed in the GAC. This message seems relevant to your situation: http://bloggingabout.net/blogs/rick/archive/2006/04/07/11929.aspx They solved it by adding the AllowPartiallyTrustedCallers attribute to the assembly. There's more information about this at: http://blogs.msdn.com/shawnfa/archive/2005/02/04/367390.aspx It's not 100% clear to me (a) how to add this attribute, or (b) whether you open any nasty security holes if you do so. Good luck!

RE: SecurityException: partially trusted callers - Added by Anonymous over 14 years ago

Legacy ID: #7582783 Legacy Poster: Michael Kay (mhkay)

Re IKVM, it's true that the DLL was built using IKVMC, but essentially you would have the same problem if the same assembly had been built a different way.

RE: SecurityException: partially trusted call - Added by Anonymous over 14 years ago

Legacy ID: #7583061 Legacy Poster: Lea Hayes (numberkruncher)

I have sent FastHosts an email asking if they would install Saxon to the GAC, but I cannot see them playing ball as they haven't been any help so far. Thanks for the advice Mike! I will give it a try.

    (1-5/5)

    Please register to reply