Search code examples
c#asp.netajaxajaxcontroltoolkit

Ajax Toolkit not working on website deploy


I have a working website on my local machine. I decided to buy some hosting and upload the current version, updating it as I work. Everything works on my local machine, there are just uncompleted pages. However, when I uploaded the site to godaddy, ReflectionTypeLoadException.

Here's the stack trace:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +70
   AjaxControlToolkit.ToolkitScriptManagerConfig..cctor() +68

[TypeInitializationException: The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception.]
   AjaxControlToolkit.ToolkitScriptManager..ctor() +62
   ASP.basic_master.__BuildControlScriptManager1() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:24
   ASP.basic_master.__BuildControlform1() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:22
   ASP.basic_master.__BuildControlTree(basic_master __ctrl) in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:1
   ASP.basic_master.FrameworkInitialize() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master.cs:912308
   System.Web.UI.UserControl.InitializeAsUserControlInternal() +32
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +655
   System.Web.UI.Page.get_Master() +54
   System.Web.UI.Page.ApplyMasterPage() +14
   System.Web.UI.Page.PerformPreInit() +45
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335

I have make sure that I included the Ajax dlls in my Bin folder. I have tried reloading and rebuilding my site. I am using the most current version of Ajax and ASP. Here is my site url with the stack trace if anyone wants to see it.

Thanks for any help.

--felesmorits


Solution

  • Doing research on internet, I found ajax control toolkit requires full trust to function. The default trust on server is medium, you need to change that to full. Add <trust level="Full" /> under system.web in your web.config.

    http://support.winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx