Last post Feb 13, 2008 07:40 AM by mikrit
Feb 13, 2008 05:29 AM|mikrit|LINK
I want to make all call to SimpleHandler.aspx to go to my class Comments.
I have made a new class in my App_Code folder with name "Comments.vb" The class name is "Comments" and the code is as follow:
Public Class Comments : Implements IHttpHandler
Public Function GetCommentXML() As XDocument
Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.IsReusable
Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
This line is added in <httpHandlers> section in Web.Config file.
When I compile the project i get error in web.config on the add verb line:
<add verb="*" path="SimpleHandler.aspx" type="Acme.Comments,Comments" />
The project can't recognize the Comment class.
I use VS 2008. Can someone see what I missed in my code?
Feb 13, 2008 06:26 AM|ivanatanasov|LINK
what .net version you are set on web project .net 2.0 , .net 3.0, .net 3.5
Feb 13, 2008 06:28 AM|vik20000in|LINK
I think in the type you need to specify the type as assembly.namespace.classname, assemblyname.
Also Have a look at these 2 article.
Feb 13, 2008 07:02 AM|mikrit|LINK
I use .Net version 3.5
I'm using the internal iis in Visual Studio.
Feb 13, 2008 07:40 AM|mikrit|LINK
I solved the problem.
I created a Class Library in my project and added a reference to it from my webproject.
Then it worked fine. It seems like you must have a dll in the "Bin" folder for the reference.
Is there any way to say I want to go to a special function when i call SimpleHandler.aspx?