drlewicki
asked on
does not implement interface member
This error is in this asp.net c# code that I don't normally see.
[System.Runtime.CompilerSe rvices.Com pilerGloba lScopeAttr ibute()]
public class admin_systems_and_versions _aspx : global::Admin, System.Web.IHttpHandler {
private static bool @__initialized;
Error 3 'ASP.admin_systems_and_ver sions_aspx ' does not implement interface member
'System.Web.IHttpHandler.I sReusable'
c:\WINDOWS\Microsoft.NET\F ramework\v 2.0.50727\ Temporary ASP.NET Files\
teststatus2production\7e35 2623\d1efa 770\App_We b_xslh3hfa .0.cs 157
I tried removing the temporary asp.net files and that did not work.
[System.Runtime.CompilerSe
public class admin_systems_and_versions
private static bool @__initialized;
Error 3 'ASP.admin_systems_and_ver
'System.Web.IHttpHandler.I
c:\WINDOWS\Microsoft.NET\F
teststatus2production\7e35
I tried removing the temporary asp.net files and that did not work.
ASKER
How? In what page?
The error message would suggest that you have a page called "Admin_Systems_and_Version s.aspx" that is marked as implementing the IHttpHandler interface, but doesn't implement the IsReusable method of the interface.
ASKER
what is the solution?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It appears that you have defined a class like this:
public class admin_systems_and_versions _aspx : global::Admin, System.Web.IHttpHandler
this indicates that your class is implementing the interface
System.Web.IHttpHandler
and in order to implement that Interface, you MUST implement a method:
public void ProcessRequest(HttpContext context) {
}
and a property:
public bool IsReusable {
get {
return false;
}
AW
public class admin_systems_and_versions
this indicates that your class is implementing the interface
System.Web.IHttpHandler
and in order to implement that Interface, you MUST implement a method:
public void ProcessRequest(HttpContext
}
and a property:
public bool IsReusable {
get {
return false;
}
AW
An interface is only a contract between the ASP.NET engine and the developer. The engine agrees to provide specific functionality to your application through this interface, and you agree to give it the specifics of how you want it to work. Every interface is going to have some property or method you need to implement in your application's code. In this case, there are only the two items referenced at the link I provided and demonstrated by Arthur_Wood.
... here, when they say "implement", they are meaning:
"define", "create", "write", "include", "specify"
... not what the English verb "implement" generally means:
"perform", "put into effect", "carry out", "execute"
You don't ever have to execute the method, but in order to fulfill the Interface's contract, you must define the method to your class that implements an interface.
"define", "create", "write", "include", "specify"
... not what the English verb "implement" generally means:
"perform", "put into effect", "carry out", "execute"
You don't ever have to execute the method, but in order to fulfill the Interface's contract, you must define the method to your class that implements an interface.
>>> ... here, when they say "implement"
Another great lesson in basic assumptions. I've been using the language so long, I had not even thought that someone could misconstrue that concept.
In programming, the best definition I have seen for "implement" is "providing a practical means for accomplishing something". An interface is merely a skeleton. It does not actually include code to *do* anything, but instead provides the overall structure that must be followed in order to do a particular thing. When you define a class as inheriting an interface, it is inheriting that general structure. Still, there is no code...you need to provide the code for it. Providing that code is referred to as "implementing", or an "implementation" of, the interface.
Think of it in the context of a car. The car interface says you must have a steering wheel, an engine, and brakes. The interface does not actually create those items - it only mandates their existence. Each car manufacturer can choose to implement this interface in a variety of ways, but every car *must* have those properties.
Another great lesson in basic assumptions. I've been using the language so long, I had not even thought that someone could misconstrue that concept.
In programming, the best definition I have seen for "implement" is "providing a practical means for accomplishing something". An interface is merely a skeleton. It does not actually include code to *do* anything, but instead provides the overall structure that must be followed in order to do a particular thing. When you define a class as inheriting an interface, it is inheriting that general structure. Still, there is no code...you need to provide the code for it. Providing that code is referred to as "implementing", or an "implementation" of, the interface.
Think of it in the context of a car. The car interface says you must have a steering wheel, an engine, and brakes. The interface does not actually create those items - it only mandates their existence. Each car manufacturer can choose to implement this interface in a variety of ways, but every car *must* have those properties.
http://msdn.microsoft.com/en-us/library/system.web.ihttphandler_members.aspx