Why isn't #Include working on .asp page on IIS7?

Clay Nichols picture Clay Nichols · Feb 14, 2009 · Viewed 8.8k times · Source

SYMPTOM:

I have Test_virtual.asp with the following:

<body>&nbsp;
included content starts here:
<!--#include virtual="/test_included.txt"-->
</body>

test_included.txt contains only:

This is the included file

When I browse to test_virtual.asp, I don't see the included file's text.

POSSIBLE CAUSES
I found one report that indicated the Includes are disabled by default in II7: http://tech.mikeal.com/blog1.php/2008/08/05/server-side-includes-for-html-in-iis7

But the instructions assume you have access to the actual machine's control panel.

Answer

Clay Nichols picture Clay Nichols · Feb 14, 2009

More info: it looks like the issue is that Includes are disabled by default. I figured out that I can get to the Handler Setting in the IIS7 Manager but it's telling me that I have to manage them direclty in the config file b/c the site is in a shared app pool running in Classsic mode.

How many programmers does it take to fix this problem? None. It's a an IT problem.