You can try something similar below.
CONFIGURATION SAMPLE
The following configuration example disables the #exec command for SSI files on the website by default.
<location path="Default Web Site"> <system.webServer> <serverSideInclude ssiExecDisable="true" /> </system.webServer> </location>
C # file looks below
using System; using System.Text; using Microsoft.Web.Administration; internal static class Sample { private static void Main() { using (ServerManager serverManager = new ServerManager()) { Configuration config = serverManager.GetApplicationHostConfiguration(); ConfigurationSection serverSideIncludeSection = config.GetSection("system.webServer/serverSideInclude", "Default Web Site"); serverSideIncludeSection["ssiExecDisable"] = true; serverManager.CommitChanges(); } } }
You can get more information on the server side.
For your second question:
You can use the master page . Then, all inherited pages will have both headers and footers.
Hope this helps you.
source share