Elmah in asp.net mvc release-mode only -


i've installed elmah (the standard package default settings) via nuget manager console.

for test , better understanding tried reconfigurate runs in "debug mode" (after successful test i'd have 2 different configurations debug , release (e. g. in release send email, in debug not, etc.)).

therefore i've moved of (working) configuration web.config web.debug.config:

<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform">   <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>   <system.web>     <httpmodules>       <add name="errormail" type="elmah.errormailmodule, elmah" />       <add name="errorfilter" type="elmah.errorfiltermodule, elmah" />       <add name="errorlog" type="elmah.errorlogmodule, elmah" />     </httpmodules>   </system.web>   <system.webserver>     <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="false" />     <errormail from="xxxx" to="xxxx"                 async="true"  smtpport="0" />   </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> 

now when try open elmah.axd page "the resource cannot found." error. did miss something?

locally should use web.config-file.

the debug or release-mode don't have relation config-file used. it's when deploying transformation takes place:

web.config

this config file developers should use locally. ideally should standardized. instance use localhost db strings, , not. should strive work on dev machines without changes.

web.debug.config

this transform applied when publish application development staging environment. make changes web.config required target environment.

web.release.config

this transform applied when publish application "production" environment. you'll have careful passwords depending on application/team.

reference link: http://blogs.msdn.com/b/webdev/archive/2010/10/26/asp-net-web-projects-web-debug-config-amp-web-release-config.aspx


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -