En mi aplicación ASP.NET MVC2 Elmah no puede registrar cualquier HttpRequestValidationException
(excepto cuando se inicia la sesión en el servidor web a través de escritorio remoto y navegar por el sitio como localhost)Elmah no registraba HttpRequestValidationException
Por ejemplo si escribo '
en un cuadro de texto cuando se navega normalmente desde mi PC utilizando el nombre de dominio consigo
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on
remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web application.
This <customErrors> tag should then have its "mode" attribute set to "Off".
Y no aparece nada en el registro de Elmah.
Pero si me registro en el servidor web a través de escritorio remoto y navegar por el sitio como localhost puedo ver el mensaje de error completo:
Server Error in '/' Application.
A potentially dangerous Request.Form value was detected from the client
sé por qué se muestran diferentes mensajes de error, es porque yo no' Tengo un nodo <customErrors mode="Off"/>
en mi web.config. Pero está bien, no quiero que se muestre el mensaje de error completo al mundo entero.
Pero lo que sí quiero es que Elmah registre este error cuando ocurra. ¿Qué debo hacer para que esto funcione como se espera?
FYI: Application_Error no parece funcionar en modo de canalización integrada en IIS7. –