Click here to Skip to main content
14,836,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im getting this error, thank you in advance for your help.

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:

Module

IIS Web Core

Notification

Unknown

Handler

Not yet determined

Error Code

0x80070032

Config Error

The configuration section 'defaultDocument' cannot be read because it is missing a section declaration

Config File

\\?\E:\isrintranet\web.config

Requested URL

https://mywebsite.com/

Physical Path



Logon Method

Not yet determined

Logon User

Not yet determined

Config Source:

11:

12: <defaultDocument>

13: <files>

More Information:

What I have tried:

my web.config
===================================================================

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<appSettings>
    </appSettings>
	<connectionStrings/>
	
	
	<!--<compilation debug="false"/>
	
	<authentication mode="Windows" />-->
  
        <defaultDocument>
            <files>
                <add value="default.html" />
            </files>
        </defaultDocument>
        <directoryBrowse enabled="false" showFlags="Extension" />
        <httpRedirect enabled="false" destination="" exactDestination="true" childOnly="false" httpResponseStatus="Found" />
        <httpErrors>
            
        </httpErrors>
        <caching>
            <profiles>
                <remove extension=".pdf" />
                <add extension=".pdf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
            </profiles>
        </caching>
        <security>
            <requestFiltering allowHighBitCharacters="false">
                <fileExtensions allowUnlisted="false">
                    <remove fileExtension=".config" />
                    <add fileExtension=".html" allowed="true" />
                    <add fileExtension=".htm" allowed="true" />
                    <add fileExtension=".docx" allowed="true" />
                    <add fileExtension=".doc" allowed="true" />
                    <add fileExtension=".docm" allowed="true" />
                    <add fileExtension=".dotm" allowed="true" />
                    <add fileExtension=".docb" allowed="true" />
                    <add fileExtension=".xls" allowed="true" />
                    <add fileExtension=".xlt" allowed="true" />
                    <add fileExtension=".xlm" allowed="true" />
                    <add fileExtension=".xlsx" allowed="true" />
                    <add fileExtension=".xlsm" allowed="true" />
                    <add fileExtension=".xltx" allowed="true" />
                    <add fileExtension=".xltm" allowed="true" />
					<add fileExtension=".lnk" allowed="true" />
                    <add fileExtension=".ppt" allowed="true" />
                    <add fileExtension=".pot" allowed="true" />
                    <add fileExtension=".pps" allowed="true" />
                    <add fileExtension=".pptx" allowed="true" />
                    <add fileExtension=".pptm" allowed="true" />
                    <add fileExtension=".potx" allowed="true" />
                    <add fileExtension=".potm" allowed="true" />
                    <add fileExtension=".ppam" allowed="true" />
					<add fileExtension=".mpg" allowed="true" />
					<add fileExtension=".wmv" allowed="true" />
                    <add fileExtension=".ppsx" allowed="true" />
                    <add fileExtension=".ppsm" allowed="true" />
                    <add fileExtension=".sldx" allowed="true" />
                    <add fileExtension=".sldm" allowed="true" />
                    <add fileExtension=".pub" allowed="true" />
					<add fileExtension=".pdf" allowed="true" />
                    <add fileExtension=".mil" allowed="true" />
                    <add fileExtension=".css" allowed="true" />
                    <add fileExtension=".js" allowed="true" />
                    <add fileExtension=".jpg" allowed="true" />
                    <add fileExtension=".png" allowed="true" />
                    <add fileExtension=".gif" allowed="true" />
                    <add fileExtension=".tif" allowed="true" />
                    <add fileExtension=".tiff" allowed="true" />
                    <add fileExtension=".aspx" allowed="true" />
                    <add fileExtension=".jpeg" allowed="true" />
                </fileExtensions>
                <alwaysAllowedUrls>
                    <add url="" />
                    <add url="" />
                </alwaysAllowedUrls>
                <verbs allowUnlisted="true" />
            </requestFiltering>
            <authorization>
                <remove users="" roles="Adminisrators" verbs="" />
                <add accessType="Allow" users="*" roles="" />
            </authorization>
        </security>
    </system.webServer>
    <system.web>
        <trust level="Medium" />
		<section name="uri" type="System.Configuration.UriSection" />
    </system.web>
</configuration>
Posted
Updated 7-Jan-21 6:51am

1 solution

You are missing the opening <system.webServer> tag, which should be after <connectionStrings/> and before <defaultDocument>.
XML
<system.webServer>
    <defaultDocument>
        <files>
            <add value="default.html" />
        </files>
    </defaultDocument>
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900