Problem with asp.net custom hander
ive written a custom http handler and its in app_code. It's just a website so code is not being compiled into a dll. I've written the handler and its signature looks like this...
namespace MicrotanksWebsite
{
public class RssHandler : IHttpHandler
{
}
}
The error i'm getting is:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load type 'MicrotanksWebsite.RssHandler'.
the web config looks like this
<httpHandlers>
<add verb="*" type="MicrotanksWebsite.RssHandler" path=&q开发者_JAVA技巧uot;*.rss" />
</httpHandlers>
any ideas?
Been there...
If your handler file is not in the root folder of the application (sub folder or something) iis requires you to copy your dll with YourNameSpace.YourHandlerType
to that folder.
You need to specify the assembly:
<httpHandlers>
<add verb="*" type="MicrotanksWebsite.RssHandler, MyAssembly" path="*.rss" />
</httpHandlers>
I've switched the project from a asp .net website to a asp .net web application(which builds a dll) and was able to get it to work. I'm still not sure how it's possible when no dll in built like a asp .net website project.
精彩评论