Security Exception

Sep 15, 2009 at 6:54 PM

I recently deployed a project using the MVC ScriptManager to a production server and I ran into a security problem that I am not sure how to approach.  Looking at the source for MVC ScriptManager I see that it is a signed assembly, does this pertain to my problem? If so, how can I correct it without being able to elevate my trust level on the server?

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 14:     <link href="/Content/Css/jquery.modal.css" rel="stylesheet" type="text/css" />
Line 15: <script type="text/javascript" src=""></script>
Line 16: <mvc:ScriptManager runat="server" CombineScriptsHandlerUrl="/CombineScripts.axd">
Line 17: <Scripts>
Line 18: <mvc:ScriptReference Path="~/Content/Js/jquery/jquery.validate.min.js" />
Sep 15, 2009 at 7:05 PM
Edited Sep 15, 2009 at 7:05 PM

Reading a little further it looks like the Mvc ScriptManager assembly needed to be set to AllowPartiallyTrustedCallers (in AssemblyInfo.cs). What I am wondering is why the assembly was requiring full trust in the first place?


[assembly: AllowPartiallyTrustedCallers] 


Oct 27, 2009 at 5:21 AM

This is open source project. You are welcome to download the source and modify the code as you see fit. :-)