Hi Johan,
ASP opens and processes the file all within asp.dll. There server core
(where ISAPI filters live) is not involved. There are no programmatic hooks
between the time that ASP opens it and the time it parses it.
As a result of this, there is no practical way to do what you are suggesting
with a filter, or any other automatic hook. It is, in theory, possible to
write a URL_MAP filter that intercepts the name of the physical file
associated with the URL, makes a modified copy, and then points the physial
file name at the copy. There are some "gotchas" that make this impractical
for any real world use. First off, the performance would be pretty bad.
Also, it would only work for the actual file associated with the URL. If
the ASP page has any includes, executes or transfers in it, there would be
no useable notification allowing you to handle them.
Thank you,
-Wade A. Hilmo,
-Microsoft
PS: If you have any other questions regarding this or any other ISAPI
issue, please feel free to post them to
microsoft.public.platformsdk.internet.server.isapi-dev, which exists for
this purpose.
"Johan Karlsson" <johan.karlsson RemoveThis @adnome.se> wrote in message
news:#Y$q47l3DHA.3936@TK2MSFTNGP11.phx.gbl...
> Hi!
>
> We are doing some brainstorming to find new ways to develop out product in
a
> couple of different areas. One way to go includes writing an ISAPI filter
> that "runs" before the ASP code gets parsed.
>
> The reason for doing this is that we want to handle some special tags
> differently and basically turn then into html before the ASP code gets
> parsed.
>
> Something like this:
>
> Content on disk:
> <html><body><mytag:blablabl></body></html>
>
> Runs through the custom ISAPI filter:
> <html><body><% asp code %></body></html>
>
> Then the ASP gets parsed:
> <html><body>I like beer</body><html>
>
> The questions are:
> 1) Is this possible or is it just stupid, is there another way of doing
> this?
> 2) Can this ISAPI filter be written using any .net language or do I need
to
> be coding unmanaged c++ for this?
>
>
>
> Thanks
>
> /Johan
>
>
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: ISAPI filter