IIS Server - How to map URL prefix to ISAPI extension ?

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > December 2005 > How to map URL prefix to ISAPI extension ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to map URL prefix to ISAPI extension ?
mk

2005-12-30, 7:56 am

I need to map not only file extensions but complete URL prefixes to
ISAPI extensions.
For example:
http://localhost/foo shall map to C:\MyExtensions\bar.dll
The resulting behaviour shall be that for example:
http://localhost/foo will set PATH_INFO to / and invoke bar.dll
http://localhost/foo/a/b/c will set PATH_INFO to /a/b/c and invoke
bar.dll

How to achieve this (e. g. on IIS 5.0 running on W2K) ?

I have set up a virtual directory /foo and added a mapping for ".*" to
"bar.dll", which actually works well (all subsequent contexts map to
bar.dll automatically now), but PATH_INFO contains the virtual
directory name "/foo". e. g.:

http://localhost/foo will set PATH_INFO to /foo and invoke bar.dll
http://localhost/foo/a/b/c will set PATH_INFO to /foo/a/b/c and invoke
bar.dll

So where is my fault ? How to remove the "/foo" prefix from PATH_INFO ?

Actually it only happens with virtual directories in conjunction with
mappings.
PATH_INFO has no prefixed "/foo" if I am giving the dll name in the URL
(what I don't want users to do).

Please help, I'm totally confused!

Markus

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com