timorris / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Make ELMAH's error browser externally referenceable #280

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?
ELMAH's HTML-based logs browser is essential in being able to easily browse and 
comprehend exceptions that are stored in the database. It would be ideal if 
there was a trivial method of referencing ELMAH to display the error logs from 
the inside of a firewall for multiple secure sites and databases where 
allowRemoteAccess is turned off on the web server.

What goal would this enhancement help you achieve?
We publish multiple sites every month, each one database-driven, and we do not 
implement Active Directory roles except for I.T. staff who are only responsible 
for setting the servers up nor do our web sites implement Forms authentication 
or any authentication of any kind. We need to be able to securely browse the 
error logs for each of our sites without setting up a separate site for each 
site just for browsing its errors.

I have an ELMAH Browser app that demonstrates what I had to implement in order 
to accomplish this without modifying Elmah.dll's source (although I did 
recompile for .NET 4.0 using Hg rev. 61 and also fixed an ErrorJson bug, 
separately reported), but it required some very heavy manipulation of the 
output streams so that, for example, the stylesheet references are relative to 
my ElmahController and not the nested action URL. It is an MVC 3.0 app with a 
"Site" controller that allows the user to add or browse a list of IIS web 
sites. Once the user selects a site, the application's global configuration is 
hijacked so that ELMAH will read the configuration for the selected site rather 
than the configuration of the ELMAH Browser app.

This implementation works (for me) but is incredibly kludgy. For one thing, it 
does not scale users; since it hijacks the global configuration for the ELMAH 
Browser app it will not support multiple users nor multiple simultaneous page 
loads across different referenced site configurations. From a maintenance 
standpoint is also very awkward to have to rewire the generated resource 
references and links to MVC routes. Hijacking the output stream to fix a 
stylesheet reference demonstrates a poorly designed system--of course, this 
specifically was never designed in the first place, so that's the enhancement 
I'm requesting.

Original issue reported on code.google.com by MrStimp...@gmail.com on 27 Feb 2012 at 5:48

GoogleCodeExporter commented 9 years ago
Another area of kludginess is that the logs are loaded by stored procedure by 
IIS site ID, i.e. /LM/W3SVC/48/ROOT. IMO it would be far more manageable to 
filter on the bindings URL and an optional machine hostname filter.

Original comment by MrStimp...@gmail.com on 27 Feb 2012 at 6:02