Reputation: 12139
SYMPTOM:
I have Test_virtual.asp with the following:
<body>
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.
Upvotes: 2
Views: 8814
Reputation: 12139
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.
Upvotes: 1
Reputation: 2327
Try using file instead of virtual:
<!--#include file="../test_included.txt"-->
or
<!--#include file="test_included.txt"-->
depending on where your file is.
I'm also assuming classic ASP support has been enabled for your IIS7 server as I'm pretty sure it isn't there by default.
Can you see the directive when you view source in the browser? That might tell you if it is being ignored or if it is just failing.
Upvotes: 0