Can I get IIS to add (inject) HTML to every page it serves?

I would like to add HTML code to every page that runs IIS 6. It serves static HTML for the most part. Can IIS or extension do this? I need some control over how and where HTML is entered, in this case before the tag. Thanks for your suggestions!

+3
source share
3 answers

I suppose the only thing you can do is insert a document footer (on the Documents tab).

+2
source

If you are familiar with ASP.NET, you can write an HTTP Response Filter .

.

HttpResponse :

public Stream Filter {get; set;}

MSDN : " , HTTP ". , . HttpResponse . , , .

, "" (, , , ) . , , . .

Filter System.IO.Stream. System.IO.Stream( ) .

+2

In IIS itself, you can add a footer that works great for a copyright line or similar. If you want more control in order to truly β€œenter”, I would create an HTTP (.NET) handler that processes .html requests and adds what you need.

If you're an β€œold school,” use ISAPI filters instead. Too much work for my tastes.

+1
source

Source: https://habr.com/ru/post/1704653/


All Articles