Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Dispatcher on IIS and ServerSideIncludes

Avatar

Level 1

Rendering of my header takes almost a second. To remedy the issue I wanted to use Server Side Includes. Unfortunately I am working on IIS.

 

I've added the ServerSideIncludes in Windows Features, and created a Module Mapping for *.html.
Assume we start with an empty Disapatcher cache. I visit in my browser http://my-domain/home.html. Markup when returned directly from the publisher contains the SSI directive:

<body>
<!-- #include virtual="/content/header.html" -->
rest of page</body>

As the request is further processed through IIS, I can see "Error processing SSI file" in the browser instead of the actual header (which means at least that SSI directives are handled by IIS in some way). I can also see only single file home.html in the cache. At least something is happening.

 

If I now visit http://my-domain/content/header.html in my browser, I can see the proper header markup. Because this goes through the Dispatcher, the /content/header.html is now cached as a file on disk alongside home.html. If I now go to http://my-domain/home.html again I can see the proper header in my browser.

 

From the logs it seems that when IIS handles the request for home.html, the Dispatcher is never asked about "/content/header.html". I thought this is about the order of the two Handler Mappings in IIS:

 

image.png

but the problem persists regardless of their relative order.

 

In Apache httpd the "#include virtual" is handled almost like a fresh request, starting from httpd entry point, in particular the Dispatcher module would be asked for /content/header.html. This seems not to be the case with IIS, it seems only existing files are taken into account for "#include virtual". Am I doing something wrong, missing something or maybe it's simply not possible in IIS?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Unfortunately there are very few users of dispatcher in combination with IIS, thus the experience with IIS in this area is quite limited.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Unfortunately there are very few users of dispatcher in combination with IIS, thus the experience with IIS in this area is quite limited.