473,749 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MissingMethodEx ception Confusion

OK, this one has me completely confused. Here's the situation:

I have a home-rolled session management system, which allows me to share
session state between my ASP.NET applications and my ASP Classic
applications.

To do this, I have a SessionPage class, which is what I inherit all of my
pages from, and a SessionUserCont rol class, which is what I inherit all of
my user controls from.

One of the public methods in both is: void abandonSession( );

If I call this from a user control, then it simply executes the following
code in the base class:

public void abandonSession( ) {
SessionPage parentPage = (SessionPage)th is.Page;
parentPage.aban donSession();
}

This works like a charm. If, however, I have a page inheriting from
SessionPage, and I just call:

this.abandonSes sion();
or
base.abandonSes sion();
or
((SessionPage)t his).abandonSes sion();
or any of about 100 other permutations of referencing the object...

....then I get a System.MissingM ethodException. Method not found: Void <my
project>.Sessio nPage.abandonSe ssion().

I beg to differ - I can find the method, Intellisense can find the method,
ildasm can find the method, the user control class can find the method - why
can't my page find this method???!!!

Is there anything that can be done to get this to work? I can include the
user control, so it's not blocking my progress, but it just seems inane that
I would need to have this extra file. Am I missing something obvious? I'm
using the 1.1 runtime, the class I am inheriting from is in another assembly
which I have updated the reference to, and it is registered for COM Interop.
I am out of ideas - I give up. Help?

--
Chris Jackson
Software Engineer
--
Nov 17 '05 #1
6 3628
Hi,

Check that SessionPage.dll exist with the correct version in the
application directory and GAC (if exist). it sound like you reference
correct DLL in design time but wrong one in run time. Usually wrong
versions in GAC and bin directory cause this.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Hi,

Check that SessionPage.dll exist with the correct version in the
application directory and GAC (if exist). it sound like you reference
correct DLL in design time but wrong one in run time. Usually wrong
versions in GAC and bin directory cause this.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
> Check that SessionPage.dll exist with the correct version in the
application directory and GAC (if exist). it sound like you reference
correct DLL in design time but wrong one in run time. Usually wrong
versions in GAC and bin directory cause this.


I have done this. In fact, just to be sure, in VS.NET I deleted the old
reference and created a new one, and then rebuilt. This did not solve the
problem. I'm still able to access it from a user control calling the
function from the parent page, but not from the parent page itself.

--
Chris Jackson
Software Engineer
--
Nov 17 '05 #4
> Check that SessionPage.dll exist with the correct version in the
application directory and GAC (if exist). it sound like you reference
correct DLL in design time but wrong one in run time. Usually wrong
versions in GAC and bin directory cause this.


I have done this. In fact, just to be sure, in VS.NET I deleted the old
reference and created a new one, and then rebuilt. This did not solve the
problem. I'm still able to access it from a user control calling the
function from the parent page, but not from the parent page itself.

--
Chris Jackson
Software Engineer
--
Nov 17 '05 #5
> Is the Base class for SessionPage is in another assembly? Are they in same
folder? You may try to refer the copy in same folder to see if it will

help.

All of the pages in my application reside in one assembly.

They derive from my SessionPage class, which resides in a separate assembly.
This assembly is in the GAC, and it is being found.

The methods of the class that handle the session management are all
working - the code from my overrides all executes.

Additionally, I can call the public abandonSession( ) function from my ASCX
pages, which derive from SessionUserCont rol in the same assembly as
SessionPage. Moreover, this function is able to call the abandonSession( )
function from the SessionPage class - I just can't do so directly from a
page that derives from . This is what I do in my ASCX page that works:

public void abandonSession( ) {

SessionPage parentPage = (SessionPage)th is.Page;

parentPage.aban donSession();

}
SessionPage inherits from System.Web.UI.P age, and SessionUserCont rol
inherits from System.Web.UI.U serControl.

It's just ... weird...

I have tried every permutation of casting I can think of to determine if
this is the issue, and I'm still lost. What else can I look at to determine
why I am seeing this behavior?
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
Nov 17 '05 #6
You may try to search how many copies there are on your local computer,
there may be an incorrect version somewhere, try just keep one copy in the
same folder with your assembly.

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
366
by: andrew | last post by:
Hi, i have a problem that i can't solve for quite a long time. I created a dll with C# and added a reference to it in my project. i create an object from that dll (TableControl), in this object there two more objects from that dll (TableBody, TableModel). TableBody contains getter public Size Size_{ get{
1
858
by: Benjamin | last post by:
I am making a Windows EXE (.NET Visual Basic Windows Application). I would like to make it possible to open Excel Worksheets from my EXE. This should work independent of Excel version on client machine (it is out of my control to know what versions of Excel different users has.) Anyway let us say that Excel 2000 is the oldest acceptable version. I build the EXE on a PC with Excel 2000. But I it is not working on an Excel 2003 machine! ...
1
1760
by: D. Bron | last post by:
Hello, Can anyone tell me why I'm getting the following exception: Method not found: Void Maple.Collections.Set.UnionAll(System.Collections.ICollection) I'm not using reflection, I'm not using COM, and I'm not referencing external DLLs (only other projects in the same solution). If this method were really "missing", I would expect a build time error, not a run time
0
2041
by: Gos | last post by:
I have a form object (I pass form object into variable obj and do late binding) to be passed as an argument. Dim Prop As String Dim Properties As Type Private Sub LoadObjectSettings(ByRef obj As Object, ByRef myXPathNavigator As XPathNavigator, ByRef Settings As Type)
0
3182
by: Harry F. Harrison | last post by:
Hi folks, I'm getting the following error message using the System.Activator.CreateInstance shared method: A first chance exception of type 'System.MissingMethodException' occurred in mscorlib.dll Additional information: Member not found.
0
985
by: Tim Anderson | last post by:
I have a multi-project solution imported from VS 2003. It includes an exe and several dlls. If I add a method to a class in a DLL project, and then call it from exe project, this is picked up by intellisense and I can successfully compile. However when I try to debug I get a MissingMethodException on the call to the new method (it is a public method of a public class, so it is not a visibility issue). I've tried Clean, and rebuilding...
1
3180
by: Richard Lewis Haggard | last post by:
I'm having a problem with what appears to be some sort of confusion with references. I have a single solution with a dozen projects which has been working quite nicely for a while. The references between projects in the solution were established through project references, not by browsing to an assembly DLL. All of the projects are strongly named and use key files. Each project's AssemblyInfo.cs specifies the assembly version, where the...
1
1532
by: S Clough | last post by:
I've got a VS2005 solution (written in C# and OpenGL) with an executable, that calls lots of sub project dlls (which are in the same solution). I briefly changed the main project to a dll (class library), then back to an exe (windows application) but now when I try to run it I get a "MissingMethodException". I can get rid of this by selecting "Enable unmanaged code debugging" in the project options, but then I can't edit my code while...
4
5198
by: Rob Blackmore | last post by:
Hi, Can anyone advise how to call a private constructor using reflection? I currently get the above error which is rectified by changing the New() to Public from Friend but I ideally wish to leave it as Friend to prevent it being created outside of this project. Thanks in advance Rob
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.