HttpHandlers and web.config problems

  • Thread starter Thread starter Andy B.
  • Start date Start date
A

Andy B.

I have a web application that has a folder of httpHandlers in it. I put the
httpHandlers in the Rss namespace in the web application. I am having
problems getting the httpHandlers inside the web.config. I keep getting
'Can't load type 'typeName'' errors. The httpHandler in question is called
News.ashx. It is in the project called Website in the namespace Rss. The
handler class is called News. How would I register this in web.config?
 
You need to provide some more information.


<httpHandlers>
<add verb="*" path="News.ashx" type="MyLibrary.MyNamespace.MyHandler,
MyLibrary" />
httpHandlers>


MyLibrary.MyNamespace.MyHandler is your class name fully qualified of your
Handler.
The second "MyLibrary" is your assembly file name, withOUT the ".dll" at the
end of it.


Google some of that stuff, and you'll probably find the missing link.
 
Here is the line to register httpHandler

<add verb="*" path="/admin/ServiceCalls.ashx" validate="false"
type="clsJSONService"/>

If your class is in namespace Rss then it would be

<add verb="*" path="/admin/ServiceCalls.ashx" validate="false"
type="Rss.clsJSONService"/>

George.
 
Got it. The final register line is:

<httpHandlers>
<add verb="*" path="news.ashx" type="Website.RssFeeds.News"/>
</httpHandlers>
 
Back
Top