Server Error in '/' Application Problem

Topics: Help
May 19, 2007 at 11:40 PM
While this is a n00b question, I am hoping for some guidance. I have the club starter kit running fine on my local machine but am having problem in moving it to a hosted environment. I have added the database to the host (1and1.com if that matters in any way) using a .bak of the database and it seems to have restored fine (by confirming that all of the tables have been recreated). I altered the connection string in the web.config to match the appropriate info from my host (e.g. <add name="ClubSiteDB" connectionString="Data Source=mssql09.1and1.com,1433;Initial Catalog=XXXXXXXXXXXX;User Id=XXXXXXXXX;Password='XXXXXXXXX';"/>)

Nonetheless when I try to access the website online I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Attempt to access the method failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MethodAccessException: Attempt to access the method failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


MethodAccessException: Attempt to access the method failed.
System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) +0
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +212
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) +55
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +18
System.Web.UI.PageRequestManager.get_EnableLegacyRendering() +160
System.Web.UI.PageRequestManager.OnInit() +143
System.Web.UI.ScriptManager.OnInit(EventArgs e) +273
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692


Any help would be greatly appreciated.
May 20, 2007 at 2:33 PM
What Trust environment does your web host have established? If they use a Medium Trust environment, then you will need to start removing components to get it to work. I would start with the AJAX component first.
May 20, 2007 at 8:49 PM
Thanks firstwatch. I spoke to the web host and they do have a fairly restrictive Trust environment (and are not really that .net friendly in general) so I am off to find a different web host.
May 21, 2007 at 5:38 AM
As a final note - after the troubles with 1and1 I tried out ultimahosts.net based on the recommendation in another forum here and they were great. I was up and running in 15 minutes.