HttpHandlers and web.config problems

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?
 
S

sloan

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.
 
G

George

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.
 
A

Andy B.

Got it. The final register line is:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top