MissingMethodException: Method not found

MissingMethodException: Method not found

Old forum URL: forums.lhotka.net/forums/t/5919.aspx


charles3900 posted on Tuesday, December 02, 2008

I have inherited a web-site based on CSLA and never used CSLA before. 

I have set up the web-site on Windows Vista / IIS 7.0 (I understand I can't run CSLA with the Cassini server.)

When I run the web-site, I get the following error message:

"MissingMethodException: Method not found"

I have Csla 3.6.0.0 in the GAC and the site builds.

My thanks in advance.

Charles

 

ajj3085 replied on Tuesday, December 02, 2008

Where is the exception occurring?  The debugger should break when an exception is hit.  Do you have any other details?

charles3900 replied on Tuesday, December 02, 2008

Thanks for the interest. I have actually gotten it two places, one in my own code which I know is there and one in a call to DataPortal.Create.

However, it is possible that when the debugger listed my own code it was really a problem of my code calling DataPortal.Create.

Note that since I can't run in Cassini, I get the error message in my Internet browser.

Does this mean anything to you?

I assume the DataPortal.Create is in the Csla in the GAC which is why I confirmed the Csla was really in the GAC and in my list of references.

Below is the complete error message from the browser. Let me know what else I can tell you.

[MissingMethodException: Method not found: 'System.Object System.Windows.Threading.Dispatcher.Invoke(System.Delegate, System.Object[])'.]
   Csla.DataPortal.get_IsInDesignMode() +0
   Csla.DataPortal.GetDataPortalProxy(Boolean forceLocal) +9
   Csla.DataPortal.Create(Type objectType, Object criteria) +505
   Csla.DataPortal.Create() +73
   RHIN.Library.OrganizationList.NewOrganizationList() +29
   RHIN.Library.Security.RHINIdentity..ctor() +174
   RHIN.Library.Security.RHINIdentity.UnauthenticatedIdentity() +38
   RHIN.Library.Security.RHINPrincipal.Logout() +27
   ASP.global_asax.Application_AcquireRequestState(Object sender, EventArgs e) in c:\ProjectsVS9\III\RHIN\Portal\Global.asax:142
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 

ajj3085 replied on Tuesday, December 02, 2008

Hmm, that's bizarre.  It's like it can't find Wpf.  Do you have .Net 3.5 installed?

charles3900 replied on Tuesday, December 02, 2008

yes - .NET 3.5 is installed.

You mentioned wpf - windows presentation foundation? This is a web-site, do I need wpf?

 

ajj3085 replied on Tuesday, December 02, 2008

Well, yes and no.  Csla detects if it's running in a Wpf application and changes its behavior if it does.  It also in other cases will check to see if it's running under Asp.Net using similar code.  It seems as if that check is failing in this case... is SP1 of .Net 3.5 installed?  I'm not sure if that's a requirement or not.

Can you attach a debugger to the process to see exactly where things are failing?


charles3900 replied on Tuesday, December 02, 2008

I don't know if I have SP1. .NET 3.5 shows an install date of 5/13/2008 if that helps.

I don't know how to attach a debugger to a web-site running from IIS - is this possible?

ajj3085 replied on Wednesday, December 03, 2008

Yes, it's possible.  You said IIS was hosted on Vista, so you'll have to run VS2008 as an Administrator (right click the shortcut and choose run as administrator).

Request a page in your browser, then go to Debug -> Attach To Process and find the wp3.exe process.. if there's more than one, try to find the one with Managed Code.

Copyright (c) Marimer LLC