user603007 user603007 - 10 days ago 5
ASP.NET (C#) Question

System.MissingMethodException: Method not found?

My asp.net webforms app was working fine until this morning. Now it throws this error??
The DoThis is on the same class so should work?

I have a generic handler which contains:

public class MyHandler: IHttpHandler
{
public void Processrequest(HttpContext context)
{
switch (somepage)
{
case "page1.aspx"
this.DoThis(); // throws error now System.MissingMethodException: Method not found?

}
}

public void DoThis()
{
//
}
}

Answer

This is a problem which can occur when there is an old version of a DLL still lingering somewhere around. Make sure that the latest assemblies are deployed and no duplicated older assemblies are hiding in certain folders. Your best bet would be to delete every built item and rebuild/redeploy the entire solution.