Closed GoogleCodeExporter closed 9 years ago
I work in the same environment as the poster.
1. We are using ELMAH in more that on website in Production. The common
denominator in all on them not working was that there was no connection string
entry for ELMAH at the local level. All our connection strings are set at
Machine.Config or are inherited via the parent web.config.
This is was successfully resolved when adding in a connection string at the
same level as ELMAH was begin configured.
Original comment by asubhani
on 8 Jan 2011 at 1:31
So to confirm...
1) ELMAH configuration is local
2) Connection strings are stored in machine.config
3) You are accessing the connection strings by name i.e. <errorLog ...
connectionStringName="" />
This is interesting... I have done a quick test on my dev machine and it's
working fine... I tried the following:
1) Set up the MS Access provider locally
2) Log some exceptions
3) Check the .mdb was created in the |DataDirectory|
4) Move the connection string into machine.config
5) View elmah.axd and see that all errors can still be read
6) Log a new exception and test it is logged
7) Amend the connection string in machine.config to write to a new .mdb file
8) Check elmah.axd to ensure there are no errors
9) Log a new exception
10) Check elmah.axd to ensure there is 1 exception
11) Check that the new database file was created in |DataDirectory|
ALL of these tests passed!!
Furthermore, if I remove the connection string completey, and view elmah.axd, I
get a YSOD saying that Connection String is missing for Access Error Log.
Can you check your elmah.axd and check the last sentence on the page... "This
log is provided by..." to make sure it is as expected?
Maybe you can also create a page that displays details of all available
connection strings to be sure that you are getting what you *think* you are
getting!!
Original comment by jamesdriscoll71
on 10 Jan 2011 at 4:59
Original comment by jamesdriscoll71
on 19 Feb 2012 at 11:30
Original issue reported on code.google.com by
JustinJo...@gmail.com
on 8 Jan 2011 at 12:10