I'm sure this is an easy fix - but after hours of googling this, I haven't been able to find the answer.
What I am trying to do is set up a custom handler that will handle all requests with a path of {domain}/services/*.
I have a web application that has a lot of javascript and ajax calls. I want to implement a handler that will facilitate all the requests for other services (google maps, some custom services, etc.). This will allow me to leverage caching and simple configuration on the client.
My problem is with the implementation of the handler. I cannot get IIS Express (or the built in VS 2010 web server for that matter) to trap the any requests with the path information above.
I want the JavaScript client to be able to make RESTful calls, have the handler pick-up that call and process accordingly.
Here is what I have done so far:
- Implemented a class inheriting the IHTTPHandler Interface (this class is in the App_Code folder).
- Configured the Web.Config: system.webServer modules runAllManagedModulesForAllRequests="true" handlers add name="SeviceHandler" verb="" path="/services/*" type="MyWeb.UI.ServiceHandler, MyWeb.UI" resourceType ="Unspecified" handlers system.webServer
I'd appreciate some help here. This is driving me nuts.