Reputation: 493
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
Upvotes: 3
Views: 2137
Reputation: 1
I had a similar problem, having Ajax controls working locally but wasn't in actual environment. Tried most of the things out there but none worked for me.
In fact, I was passing by a deployment via Plesk
who has got a Web Firewall that discards these calls namely calls to ScriptRessource.axd
or WebRessource.axd
. Disabling ModSecurity
of Plesk did the trick for me. However it is preferable to discard only the rule concerning these resources. But I did not yet find out how to do that.
I posted this information to help any who could have a similar problem.
Upvotes: 0
Reputation: 1
Find the System.Web.Extensions.dll file and copy it over to the bin directory.
Upvotes: 0
Reputation: 592
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
Upvotes: 3