Error in publishing application to OSI

Asked

Viewed 10,666 times

4

I am publishing an application on IIS, and when accessing it I get the following error:

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the configuration data related to > page is invalid.

Detailed information of the error:

Módulo     IIS Web Core
Notificação    BeginRequest
Manipulador    Ainda não determinado
Código do erro     0x80070021
Erro de Configuração       Esta seção de configuração não pode ser usada nesse      caminho. Isso ocorre quando a seção está bloqueada em um nível pai. O bloqueio é por padrão (overrideModeDefault="Deny"), ou é definido explicitamente por uma marca de local com overrideMode="Deny" ou o allowOverride="false" herdado.
Arquivo de Configuração    \\?\C:\inetpub\wwwroot\portal\views\web.config
URL solicitada     http://localhost:80/portal/Views/Autenticacao/Entrar
Caminho físico     C:\inetpub\wwwroot\portal\Views\Autenticacao\Entrar
Método de logon    Ainda não determinado
Usuário de logon       Ainda não determinado

Origin of the Configuration:

29:   <system.webServer>
30:     <handlers>
31:       <remove name="BlockViewHandler"/>

This error I get when accessing http://localhost/application/Views/Home/Index

The strange thing is that usually when publishing the application, accessing the address: http://localhost/application works.

This time, when accessing this address only warns that:

"The web server is configured not to list the contents of this directory."

Remembering that IIS is installed on a Windows 8.1 machine

  • Could you configure this server, install packages, perform updates? The answer I would have involves this.

  • I can, because I picked up this server on my desktop. I forgot to mention that IIS is installed on a Windows 8.1 machine.

3 answers

13


Run the following sequence of steps to check your server configuration:

  1. In your Windows, go to Control Panel > Programs and Resources > Enable or disable Windows Features;
  2. Locate the "Internet Information Services" node, or "Internet Information Services". Expand the node;
  3. Locate the "World Wide Web Service" node, or "World Wide Web Service". Expand the node;
  4. Locate the "Application Development Features" node, or "Application Development Features". Expand the node;
  5. Check that ASP.NET is checked. If it is not, check and click OK.
  • That’s exactly what it was. Thank you.

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

0

All you sometimes need is to know the correct way to set up IIS to receive ASPNET Core.

According to the documentation, in addition to Runtime, you need to configure IIS

Browser other questions tagged

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