Hi Everyone.
I am developing my site in ASP.NET 4.0 and using default script manager which is available in VS 2010. I have master pages/contents pages structure. I placed script manager in the relevant contents pages where i need ajax behaviour.
When i run application on local server. everything is working fine. But on live|production server when i opened a page that contains scriptmanagerit raised security exception which is below. But when i go back and again open same page then it opened.
Exception Details:System.Security.SecurityException: Request failed.
Line 10: <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">Line 11: <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"> Line 12: </asp:ScriptManager>
"[SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)+168 System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100 System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +278 System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +70 System.RuntimeMethodHandle.CheckLinktimeDemands(IRuntimeMethodInfo method, RuntimeModule module, Boolean isDecoratedTargetSecurityTransparent)+0 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)+482 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103 System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33 System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +62 System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +272 System.Web.UI.ScriptManager..ctor() +11
"
No exception raised on further visiting page. If one time this exception will occur then this exception will not occurred during same session if i try to open other pages which contains script manager too.
Please let me know, what is the issue. I am in serious trouble.
Abid Mahmood