C
Chris Jackson
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 SessionUserControl 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)this.Page;
parentPage.abandonSession();
}
This works like a charm. If, however, I have a page inheriting from
SessionPage, and I just call:
this.abandonSession();
or
base.abandonSession();
or
((SessionPage)this).abandonSession();
or any of about 100 other permutations of referencing the object...
....then I get a System.MissingMethodException. Method not found: Void <my
project>.SessionPage.abandonSession().
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?
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 SessionUserControl 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)this.Page;
parentPage.abandonSession();
}
This works like a charm. If, however, I have a page inheriting from
SessionPage, and I just call:
this.abandonSession();
or
base.abandonSession();
or
((SessionPage)this).abandonSession();
or any of about 100 other permutations of referencing the object...
....then I get a System.MissingMethodException. Method not found: Void <my
project>.SessionPage.abandonSession().
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?