I need to change the app name based on what configuration I\'m using in Visual Studio. For example, if I\'m in Debug configuration, I want the app name to show as \'App_Debu
This can now be done purely in markup. Just add an applicationName
attribute to the errorLog
element in the
section of the web.config file. Example:
I've tested this and it works both when logging an exception and when viewing the log via Elmah.axd
.
In the case of the OP, one would imagine it can be set programatically too but I didn't test that. For me and I imagine for most scenarios the markup approach is sufficient.