I need to expose existing API as REST to outside world, for some internal reasons I decided to go with IIS8 + ASP Classic + JScript. I succeeded setting up IIS for ASP Classic and to form JSON response with JScript (the hack with HTMLFile helped significantly here). It appears I need for every exposed resource one separate ASP page (JSCript code), but it's not clear to me how to set up redirects to reach appropriate ASP when accessing particular resource, e.g.
accessing http://server/some-resources/123 should be redirected to ASP 'some-resources.asp', while I need to get the original URL in JScript, call the backend and respond with content of the some-resource with id=123
and similarly, for http://server/other-resources it should access ASP 'other-resources.asp' and respond with collection of other-resources (possibly with some paging mechanism). So the questions are
- is this basic concept of "ASP per resource" a good idea at all, or is there another "standard"?
- if yes, how to set the IIS redirects to access appropriate ASP for any URL appropriate to this resource (single resource, collection, ...)