1

I have been unable to find anything using the google... If I write on my ASP.NET code page:

<!-- #include file="file_to_include.aspx" -->

the file is output to the page. How do I disable this behavior?


MSDN info on #include and Server Side Include (SSI)

1 Answer 1

5

Even Newer Answer Now with More Cowbell!

It turns out you can disable Server Side Includes in the Web Service Extensions Manager of IIS: alt text

Just select Server Side Includes and click the Prohibit button.

Answer #2Newer Answer:

How about disabling server side includes in IIS?


Old Answer

If you use a Server Side comment, that should work.

Try this:

<%--  <!-- #include file="file_to_include.aspx" --> --%>
Sign up to request clarification or add additional context in comments.

6 Comments

Thanks for the answer - I'm looking for a more global solution so that I can prevent this behavior totally.
ooo didn't know about serverside comments! hott
If you ever forget, you can use the comment-code keyboard shortcut in visual studio (ctrl-k, ctrl-u)
@Gortok - The command you're referencing there disables running a command line via #exec in Server Side Includes (SSI). It does not however fully disable SSIs.
I added how to fully disable SSI.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.