mrbryanejones
asked on
ASP.NET HTTPhandler "Could not load type"
I am trying to write my first HTTPhandler with no joy. I want to catch all .ics requests. Using the code below I get the error "Could not load type iCalendarHTTPhandler from assembly website2". Website2 is the root class name of the project I am working on. The .ics files have been correctly added to the Application configuration for the website.
From the web.config
<httpHandlers>
<add verb="*" path="*.ics" type="iCalendarHTTPhandler
</httpHandlers>
The relevant class
Public Class iCalendarHTTPhandler
Implements IHttpHandler
Public ReadOnly Property IsReusable() As Boolean Implements System.Web.IHttpHandler.Is
Get
Return (False)
End Get
End Property
Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.Pr
context.Response.Write(Dat
context.Response.Write("Al
End Sub
End Class
Look forward to hearing from you.
Regards,
Bryan Jones
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please see my post I placed one minute after yours. You were bang on the money.
Thanks for replying so quickly. I have literally wasted hours trying to sort this out!
HttpHandlers are real pain the first time ;)
--Nauman.
--Nauman.
ASKER
What an idiot - after writing everything out and posting it I realised what I had done.
website2 is the name of my website dll, where as xyzclient was the name of my base class so the web.config should of read
<httpHandlers>
<add verb="*" path="*.ics" type="xyzclient.iCalendarH
</httpHandlers>
Easy when you know how!