ASP . net core (HTTP error 500.19 - Internal Server Error)

Asked

Viewed 3,469 times

-1

I have a web api, which when running on Iss presents error 500.19 in the browser, I am very new in the subject, I did some research this error may be on web.cofing. If anyone can help me, thank you! Follow Code of the web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <defaultDocument>
        <files>
          <add value="Index.cshtml" />
        </files>
      </defaultDocument>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\ApiSa.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    </system.webServer>
  </location>
</configuration>
  • 1

    It may be in the ApplicationHost.config or in the Web.config, basically is when your XML is poorly formed, with invalid tags, or incorrect values. It can be one or more elements with problem inside the document, but it can also be other things, just looking at the complete error, turn on the DEBUG (if it is off) and will present the complete error on the page. Or look at the visualstudio itself.

  • I have checked and Debug shows no error!

  • can send a print of what appears in the browser?

1 answer

1

After consulting the Microsoft support site, link below, I found that one of the causes of the error presented occurs because the Applicationhost.config file, or the Web.config file, contains a malformed XML element.

https://support.microsoft.com/pt-br/help/942055/http-error-500-19-error-when-you-open-an-iis-7-0-webpage

I analyzed the file Web.config, as this is the same used in another server but in another version of Windows, I did not notice any configuration error.

I identified that the error presented is due to the IIS configuration; it occurs that, by default, some IIS settings are disabled.

To change these settings, open the applicationHost.config file, available at:

C: Windows System32 inetsrv config applicationHost.config

The value of the overrideModeDefault key of the handlers and modules sections must be changed from "Deny" to"Allow" :

After applying the above adjustments, HTTP error 500.19 - Internal Server Error has been fixed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.