Physical File Mapping for the default files. RRS feed

  • Question

  • User-2053198433 posted

    How can we get the physical file mapping for the default files set in the IIS Control panel.  If the user request for a specific file, then I know the physical path of the file during the URL_MAP notification in ISAPI Filter, but if the user request is just the URL, then the default file is set,  how can I retrieve the physical path in the filter.

    for e.g., if the user request www.abc.com and the default file is set to Index.htm then I am facing the problem in retrieving the physical path.

    if the request is www.abc.com/index.htm , then I can get the file mapping in the URL_MAP notification.

     Please help me in solving this problem.

    Monday, May 4, 2009 5:23 AM

All replies

  • User-1480425032 posted

    It appears there is no easy way to get physical path. Basically, the url is rewritten to one of values defined at <defaultDocument/>. Since a new url is set in child context, the filter in parent context cannot retrieve a rewritten url. ex) in above example, c:\inetpub\index.htm.

    However, you can retrieve it in child context though. I do not know your intension, but one thing you might want to do is to skip your processing if HTTP_FILTER_URL_MAP.pszURL is ended with "/" since it will be rewritten to an actual script file if defaultDocument is available.

    Hope this helps.

    Tuesday, July 28, 2009 7:34 PM