title: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid
body: <p>I reinstalled Windows and am now configuring everything to get my machine up and running again. I'm receiving this error when navigating to www.mysite.com:
  <img src="https://i.stack.imgur.com/afSXo.png" alt="enter image description here"></p>
  
  <p>I looked at various forums and have given folder c:\dropbpx\inetpub\mysite full permissions for IIS_IUSRS, IUSR, Everyone AND NETWORK SERVICE, but I keep getting the error.
  I've also given full permissions for IIS_IUSRS on applicationhost.config in %WINDIR%\System32\inetsrv\config\</p>
  
  <p>Also when I via IIS go to my website and click on 'authentication' I get the error:
  There was an error while performing this operation.
  Details:
  Filename: \?\C:\Dropbox\inetpub\mysite\web.config
  Error:</p>
  
  <p>Application pool of my website is set to ASP.NET v4.0</p>
  
  <p>See here my web.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!--
  For more information on how to configure your ASP.NET application, please visit  http://go.microsoft.com/fwlink/?LinkId=169433
  --&gt;
  
  &lt;configuration&gt;
  
  
  &lt;connectionStrings&gt;
  &lt;add name="conn1" connectionString="data source=(local);Initial Catalog=tt;User Id=sa;Password=dfsdf3454sdg;" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  &lt;system.web.extensions&gt;
  &lt;scripting&gt;
    &lt;webServices&gt;
      &lt;jsonSerialization maxJsonLength="5000000" /&gt;
    &lt;/webServices&gt;
  &lt;/scripting&gt;
  &lt;/system.web.extensions&gt;
  
  &lt;system.web&gt;
  &lt;httpRuntime maxRequestLength="5120000" requestValidationMode="2.0" /&gt;  
  &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /&gt;
  
  &lt;sessionState mode="InProc" timeout="60" /&gt;
  &lt;authentication mode="Forms"&gt;
    &lt;forms name=".MyCookie" slidingExpiration="true" timeout="60" cookieless="AutoDetect" loginUrl="/login/" protection="All" defaultUrl="/"&gt;
      &lt;credentials passwordFormat="SHA1" /&gt;
    &lt;/forms&gt;
  &lt;/authentication&gt;
  &lt;roleManager domain="192.168.0.103" enabled="true" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="60" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" defaultProvider="AccessRoleProvider" createPersistentCookie="false" maxCachedResults="25"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AccessRoleProvider" connectionStringName="conn1" applicationName="/wedding" type="Samples.AccessProviders.AccessRoleProvider" /&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  &lt;membership defaultProvider="AccessMembershipProvider" userIsOnlineTimeWindow="30"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AccessMembershipProvider" type="Samples.AccessProviders.AccessMembershipProvider" connectionStringName="conn1" requiresQuestionAndAnswer="false" applicationName="/wedding" minRequiredPasswordLength="6" enablePasswordRetrieval="false" enablePasswordReset="true" requiresUniqueEmail="true" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed" /&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  &lt;/system.web&gt;
  &lt;system.webServer&gt;
  &lt;!-- SEO-friendly URLS for IIS 7.0 (if you're using IIS 6.0 see above) --&gt;
  &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  &lt;modules runAllManagedModulesForAllRequests="true"&gt;
    &lt;add type="aspnetforum.ForumSEOHttpModule, aspnetforum" name="ForumSEOHttpModule" /&gt;
  &lt;/modules&gt;
  &lt;handlers&gt;
    &lt;add name="ScriptCombiner" verb="POST,GET" path="ScriptCombiner.axd" preCondition="integratedMode" type="ScriptCombiner, App_Code" /&gt;
  &lt;/handlers&gt;
  &lt;security&gt;
    &lt;requestFiltering allowDoubleEscaping="true" /&gt;
  &lt;/security&gt; 
  &lt;defaultDocument&gt;
    &lt;files&gt;
      &lt;clear /&gt;
      &lt;add value="default.aspx" /&gt;
      &lt;add value="Default.htm" /&gt;
      &lt;add value="Default.asp" /&gt;
      &lt;add value="index.htm" /&gt;
      &lt;add value="index.html" /&gt;
      &lt;add value="iisstart.htm" /&gt;
    &lt;/files&gt;
  &lt;/defaultDocument&gt;
      &lt;staticContent&gt;
          &lt;mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" /&gt;
      &lt;/staticContent&gt;
  &lt;/system.webServer&gt;
  &lt;system.serviceModel&gt;
  &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
  &lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="VirtueleKassaWebServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt;
          &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
      &lt;binding name="VirtueleKassaWebServiceSoap1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
        &lt;security mode="None"&gt;
          &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt;
          &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  &lt;client&gt;
    &lt;endpoint address="https://secure.virtuelekassa.nl/webservice/VirtueleKassaWebservice.asmx" binding="basicHttpBinding" bindingConfiguration="VirtueleKassaWebServiceSoap" contract="virtuelekassa.VirtueleKassaWebServiceSoap" name="VirtueleKassaWebServiceSoap" /&gt;
  &lt;/client&gt;
    &lt;services&gt;
        &lt;service name="RestService.weddingservice"&gt;
            &lt;endpoint behaviorConfiguration="webHttp" binding="webHttpBinding" contract="RestService.Iweddingservice" /&gt;
        &lt;/service&gt;
    &lt;/services&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name=""&gt;
        &lt;serviceMetadata httpGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name="webHttp"&gt;
        &lt;webHttp /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What else can it be?</p>