mrblah
mrblah

Reputation: 103507

My HttpHandler doesn't work with a virtual directory in IIS7, but using cassini it does?

My httphandler does not work in IIS7 (virutal directory), but using cassini it works.

It used to work on my windows xp IIS also.

What could be the cause of this?

I am getting a 404 not found error when trying to access the httphandler's page.

Upvotes: 0

Views: 1826

Answers (3)

user167518
user167518

Reputation:

I have the same problem. I have an axd file registered in the web.config file. The site renders fine in all conditions, the only thing that doesn't work is the axd reference.

Using the asp.net development server (cassini) everything works perfectly.

   h t t p : / / localhost:5059    <-- works fine

But if I use the IIS instance on the machine, and a properly created virtual directory on my machine...

   h t t p : / / localhost/appName    <-- Doesn't Work.

Site renders but calls to the axf fail (404). So it isn't an improperly registered handler, a permissions issue, or a mis-spelled URL.

Additionally, if I deploy it to a server under a domain name, as a virtual directory, it works there too.

   h t t p : / / www.adomainname.com/appname    <-- works fine

The only issue is developing using IIS rather than Cassini.

Upvotes: 0

LorenVS
LorenVS

Reputation: 12857

IIS7 depends on the registration for HttpHandlers to be in a different location than usual. There is a section in system.web/webserver/handlers where you should be able to register your HttpHandler, as opposed to the standard system.web/httpHandlers

Hope that helps

Upvotes: 4

AnthonyWJones
AnthonyWJones

Reputation: 189457

Check that the Network Service (or whatever the identiy underwhich its application pool runs) has read access to the .ashx file.

Upvotes: 0

Related Questions