una servidor para mostrar los lista forbidden está este error directorio contenidos configurado asp.net-mvc iis-7 elmah

asp.net mvc - servidor - Elmah.MVC no registra errores en el entorno de producción



error 403 iis (2)

¿Su aplicación tiene acceso de escritura al directorio App_Data en su entorno de producción?

En función de su configuración, no está iniciando sesión en SQL -> la identidad del grupo de aplicaciones deberá poder modificar / escribir archivos para agregarlos al archivo App_Data / Elmah.Errors. Más información sobre por qué y cómo.

Instalé Elmah.MVC en mi proyecto MVC usando el paquete Elmah.MVC Nuget . Funciona bien en el entorno de desarrollo, pero cuando cargo el sitio web al servidor de alojamiento (IIS7) no registra errores.

Este es mi archivo de configuración web (solo la configuración de Elmah),

<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> ... <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /> </sectionGroup> </configSections> <connectionStrings> ... </connectionStrings> <appSettings> <add key="webpages:Version" value="1.0.0.0" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="elmah.mvc.disableHandler" value="false" /> <add key="elmah.mvc.requiresAuthentication" value="false" /> <add key="elmah.mvc.allowedRoles" value="*" /> </appSettings> <system.web> <customErrors mode="Off"> </customErrors> ... <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /> </httpModules> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /> </modules> ... </system.webServer> ... <elmah> <security allowRemoteAccess="yes" /> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Elmah.Errors" /> </elmah> <location path="elmah.axd" inheritInChildApplications="false"> <system.web> <httpHandlers> <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /> </httpHandlers> </system.web> <system.webServer> <handlers> <add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" /> </handlers> </system.webServer> </location> </configuration>

¿Alguien puede verificar y decir por qué no está registrando errores en el entorno de alojamiento?


Tuve un problema similar. Estaba usando esta línea:

<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Elmah.Errors" />

Incorrecto. Debe usar barra inclinada:

<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Elmah.Errors" />

Esto debería ser un comentario, pero no tengo suficiente rep.