About web.config File

Web.config is the a settings and configuration file for IIS7+ web sites. It’s commonly used for ASP.NET web applications. See Web.config.

Restoring web.config

You can use the following code if you wish to restore your default web.config.xml file hosted on our Ecenica Windows 2008/IIS7.5 Shared-Hosting servers.

  1. Create a new file named web.config.xml
  2. Copy and paste the following code.
  3. Save and upload to your wwwroot folder.

Example

Copy & paste the code below into a page called web.config.xml

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system .webServer>
        <security>
            <authentication>
                <basicauthentication enabled="false"></basicauthentication>
            </authentication>
        </security>
        <httpprotocol>
            <customheaders>
                <clear></clear>
                <add name="X-Powered-By" value="ASP.NET"></add>
            </customheaders>
        </httpprotocol>
        <directorybrowse enabled="false"></directorybrowse>
        <defaultdocument>
            <files>
                <clear></clear>
                <add value="Default.htm"></add>
                <add value="Default.asp"></add>
                <add value="index.asp"></add>
                <add value="index.htm"></add>
                <add value="index.html"></add>
                <add value="index.php"></add>
                <add value="Default.aspx"></add>
            </files>
        </defaultdocument>
    </system>
</configuration>