Click here to Skip to main content
15,615,583 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:


IIS Web Core




Not yet determined

Error Code


Config Error

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

Config File


Requested URL

Physical Path

Logon Method

Not yet determined

Logon User

Not yet determined

Config Source:


12: <defaultDocument>

13: <files>

More Information:

What I have tried:

my web.config

<?xml version="1.0" encoding="UTF-8"?>
	<!--<compilation debug="false"/>
	<authentication mode="Windows" />-->
                <add value="default.html" />
        <directoryBrowse enabled="false" showFlags="Extension" />
        <httpRedirect enabled="false" destination="" exactDestination="true" childOnly="false" httpResponseStatus="Found" />
                <remove extension=".pdf" />
                <add extension=".pdf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="00:00:30" />
            <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" />
                    <add url="" />
                    <add url="" />
                <verbs allowUnlisted="true" />
                <remove users="" roles="Adminisrators" verbs="" />
                <add accessType="Allow" users="*" roles="" />
        <trust level="Medium" />
		<section name="uri" type="System.Configuration.UriSection" />
Updated 7-Jan-21 6:51am

1 solution

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

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

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