After my previous medium trust ToolkitScriptManager issue was said to be resolved, I tested the new toolkit in medium trust.
Unfortunately this failed too:
Upon displaying the page containg the ToolkitScriptmanager:
```
<asp:ToolkitScriptManager runat="server" ID="smgr" AllowCustomErrorsRedirect="False"
AsyncPostBackTimeout="300" OnAsyncPostBackError="smgr_AsyncPostBackError" EnableCdn="True" EnableCdnFallback="True">
<Scripts>
<asp:ScriptReference Name="jquery" />
</Scripts>
</asp:ToolkitScriptManager>
```
an exception is thrown:
```
The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at AjaxControlToolkit.ToolkitScriptManagerConfig..cctor()
--- End of inner exception stack trace ---
at AjaxControlToolkit.ToolkitScriptManagerConfig..ctor(IAjaxControlToolkitCacheProvider cacheProvider)
at AjaxControlToolkit.ToolkitScriptManager..ctor()
at ASP.site_master.__BuildControlsmgr()
at ASP.site_master.__BuildControlfrm()
at ASP.site_master.__BuildControlTree(site_master __ctrl)
at ASP.site_master.FrameworkInitialize()
at System.Web.UI.UserControl.InitializeAsUserControlInternal()
at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
at System.Web.UI.Page.get_Master()
at System.Web.UI.Page.ApplyMasterPage()
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)}
```
Inner exception
```
System.Reflection.ReflectionTypeLoadException
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at AjaxControlToolkit.ToolkitScriptManagerConfig..cctor()
```
The first out of 8 LoaderExcepti ons is a System.Security.SecurityException with the following DebugString:
```
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The first permission that failed was:
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"ControlEvidence, ControlPolicy\"/>
The demand was for:
<PermissionSet class=\"System.Security.PermissionSet\" version=\"1\">
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"ControlEvidence, ControlPolicy\"/>
</PermissionSet>
The granted set of the failing assembly was:
<PermissionSet class=\"System.Security.NamedPermissionSet\" version=\"1\" Name=\"ASP.Net\">
<IPermission class=\"System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Read=\"TEMP;TMP;USERNAME;OS;COMPUTERNAME\"/>
<IPermission class=\"System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Read=\"[FULL PATH TO APPLICATION]" Write=\"[FULL PATH TO APPLICATION]" Append=\"[FULL PATH TO APPLICATION]" PathDiscovery=\"[FULL PATH TO APPLICATION]"/>
<IPermission class=\"System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Allowed=\"AssemblyIsolationByUser\" UserQuota=\"9223372036854775807\"/>
<IPermission class=\"System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"RestrictedMemberAccess\"/>
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"Execution, ControlThread, ControlPrincipal, RemotingConfiguration\"/>
<IPermission class=\"System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Net.DnsPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Drawing.Printing.PrintingPermission, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" version=\"1\" Level=\"DefaultPrinting\"/>
<IPermission class=\"System.Security.Permissions.TypeDescriptorPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Web.AspNetHostingPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Level=\"Medium\"/>
<IPermission class=\"System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Access=\"Connect\"/>
</PermissionSet>
The assembly or AppDomain that failed was:
[FULL QUALIFIED NAME OF MY LIBRARY]
The method that caused the failure was:
Void Application_Error(System.Object, System.EventArgs)
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///[FULL PATH OF DLL MY LIBRARY]" string
```
Comments: I have this problem with version 4.1.7.1213 Please fix it soon
Unfortunately this failed too:
Upon displaying the page containg the ToolkitScriptmanager:
```
<asp:ToolkitScriptManager runat="server" ID="smgr" AllowCustomErrorsRedirect="False"
AsyncPostBackTimeout="300" OnAsyncPostBackError="smgr_AsyncPostBackError" EnableCdn="True" EnableCdnFallback="True">
<Scripts>
<asp:ScriptReference Name="jquery" />
</Scripts>
</asp:ToolkitScriptManager>
```
an exception is thrown:
```
The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at AjaxControlToolkit.ToolkitScriptManagerConfig..cctor()
--- End of inner exception stack trace ---
at AjaxControlToolkit.ToolkitScriptManagerConfig..ctor(IAjaxControlToolkitCacheProvider cacheProvider)
at AjaxControlToolkit.ToolkitScriptManager..ctor()
at ASP.site_master.__BuildControlsmgr()
at ASP.site_master.__BuildControlfrm()
at ASP.site_master.__BuildControlTree(site_master __ctrl)
at ASP.site_master.FrameworkInitialize()
at System.Web.UI.UserControl.InitializeAsUserControlInternal()
at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
at System.Web.UI.Page.get_Master()
at System.Web.UI.Page.ApplyMasterPage()
at System.Web.UI.Page.PerformPreInit()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)}
```
Inner exception
```
System.Reflection.ReflectionTypeLoadException
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at AjaxControlToolkit.ToolkitScriptManagerConfig..cctor()
```
The first out of 8 LoaderExcepti ons is a System.Security.SecurityException with the following DebugString:
```
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The first permission that failed was:
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"ControlEvidence, ControlPolicy\"/>
The demand was for:
<PermissionSet class=\"System.Security.PermissionSet\" version=\"1\">
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"ControlEvidence, ControlPolicy\"/>
</PermissionSet>
The granted set of the failing assembly was:
<PermissionSet class=\"System.Security.NamedPermissionSet\" version=\"1\" Name=\"ASP.Net\">
<IPermission class=\"System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Read=\"TEMP;TMP;USERNAME;OS;COMPUTERNAME\"/>
<IPermission class=\"System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Read=\"[FULL PATH TO APPLICATION]" Write=\"[FULL PATH TO APPLICATION]" Append=\"[FULL PATH TO APPLICATION]" PathDiscovery=\"[FULL PATH TO APPLICATION]"/>
<IPermission class=\"System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Allowed=\"AssemblyIsolationByUser\" UserQuota=\"9223372036854775807\"/>
<IPermission class=\"System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"RestrictedMemberAccess\"/>
<IPermission class=\"System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Flags=\"Execution, ControlThread, ControlPrincipal, RemotingConfiguration\"/>
<IPermission class=\"System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Net.DnsPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Drawing.Printing.PrintingPermission, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" version=\"1\" Level=\"DefaultPrinting\"/>
<IPermission class=\"System.Security.Permissions.TypeDescriptorPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Unrestricted=\"true\"/>
<IPermission class=\"System.Web.AspNetHostingPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Level=\"Medium\"/>
<IPermission class=\"System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" Access=\"Connect\"/>
</PermissionSet>
The assembly or AppDomain that failed was:
[FULL QUALIFIED NAME OF MY LIBRARY]
The method that caused the failure was:
Void Application_Error(System.Object, System.EventArgs)
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///[FULL PATH OF DLL MY LIBRARY]" string
```
Comments: I have this problem with version 4.1.7.1213 Please fix it soon