httphandelrs problem

  • Thread starter Thread starter ALO
  • Start date Start date
A

ALO

Hello,
I have a problem with httpHandlers.
I've created a simple handler (code attached)

I put the compiled DLL in the bin folder.

and I put the following in my web.config

<httpHandlers>
<add verb="*" path="*.test" type="SimpleHAndler.Handler,
SimpleHAndler"/>
</httpHandlers>

but, when I browse to http://localhost/myweb/myfile.test

I get file not found.

What am i doing wrong?

Elad
 
Hi,

you need also to map the same extension in IIS for aspnet_isapi.dll so that
IIS forwards the requests to ASP.NET. After that ASP.NEt can process request
using specified HttpHandler.

Steps:
1. Open up IIS, right click the site and choose Properties.
2. "Home Directory" tab and there Configuration. In the opening window you
have Mappings tab.
3. Click Add
4. For "Executable" locate aspnet_isapi.dll at Framework's root folder
5. "Extension" is the extension you want IIS to process i.e same as the
handler is mapped to
6. "Verb"s=the HTTP verbs the request is valid for (POST,GET etc)
7. You probably want also uncheck the "Check that file exists" as by default
HttpHandler is not physical file to be served
8. Finally click OK, the mapping should appear in the list at "mappings"
tab.

Now IIS should be OK for serving the requests.
 
Back
Top