weiminye / elmah Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/elmah
License: Apache License 2.0
Automatically exported from code.google.com/p/elmah
License: Apache License 2.0
I'm using the xml logger. A lot of the time, the information in the details
view is enough to figure out if I need to fix something in the code. But
occasionally I need the form variables to figure out what really happened.
Now I have to open up the right xml file and look at the info. It would be
terrific if the details page would include that information if it existed
in the error entry.
Original issue reported on code.google.com by [email protected]
on 3 Oct 2007 at 2:13
What steps will reproduce the problem?
1. Add the ErrorLogModule to the configuration.
2. Add the ErrorFilterModule to the configuration.
3. Add error filtering via configuration that uses data-binding.
4. Cause an error to occur that should be filtered.
What is the expected output?
The error should not be logged by the error logging module.
What do you see instead?
The error is logged by the error logging module and an exception occurs
during the binding of the data expression that is swallowed by ASP.NET.
Original issue reported on code.google.com by azizatif
on 25 Jun 2007 at 9:34
We should have a page to document how to publish an exception to ELMAH
programmatically. Sometimes a developer inherits code that swallows an
exception but still wants to publish it.
Original issue reported on code.google.com by [email protected]
on 21 Aug 2007 at 5:06
I found that sometimes it was handy to have the contents of viewstate when
the error happened. So, I modified the ErrorMailModule to attach the
viewstate to the email as its own file (much like you attach the original
error).
In the PreSendMail() method, add this:
//WB attach viewstate to email...
if (error.Form!=null )
if (error.Form != null && error.Form["__VIEWSTATE"] !=
null && error.Form["__VIEWSTATE"].Length != 0)
{
//
// Create a temporary file to hold the attachment. Note
that
// the temporary file is created in the location returned
by
// System.Web.HttpRuntime.CodegenDir. It is assumed that
// this code will have sufficient rights to create the
// temporary file in that area.
//
string fileName = "ViewState-" + Guid.NewGuid().ToString()
+ ".htm";
string path = Path.Combine(HttpRuntime.CodegenDir,
fileName);
try
{
using (StreamWriter attachementWriter = File.CreateText
(path))
{
attachementWriter.Write(error.Form["__VIEWSTATE"]);
}
mail.Attachments.Add(new Attachment(path));
}
catch (IOException)
{
//
// Ignore I/O errors as non-critical. It's not the
// end of the world if the attachment could not be
// created (though it would be nice). It is more
// important to get to deliver the error message!
//
}
}
Also, in ErrorDetailPage class, RenderError() method, add:
//WB, lets write out form!
if (error.Form != null && error.Form.Count > 0)
{
NameValueCollection tempForm = new NameValueCollection
(error.Form);
tempForm.Remove("__EVENTTARGET");
tempForm.Remove("__EVENTARGUMENT");
tempForm.Remove("__VIEWSTATE");
tempForm.Remove("__EVENTVALIDATION");
RenderCollection(writer, tempForm,
"FormData", "Form");
//WB Render the viewstate also
if (error.Form["__VIEWSTATE"] != null && error.Form
["__VIEWSTATE"].Length != 0)
{
writer.RenderBeginTag(HtmlTextWriterTag.Br);
writer.RenderBeginTag(HtmlTextWriterTag.B);
writer.Write("ViewState:");
writer.RenderEndTag(); // </b>
writer.AddAttribute
(HtmlTextWriterAttribute.Id, "ErrorDetail");
writer.RenderBeginTag(HtmlTextWriterTag.Pre);
writer.Flush();
Server.HtmlEncode(error.Form["__VIEWSTATE"],
writer.InnerWriter);
writer.RenderEndTag(); // </pre>
writer.WriteLine();
}
}
finally, in ErrorMailHtmlFormatter the method RenderCollections() add:
//WB, lets write out form!
if (Error.Form!=null && Error.Form.Count>0)
{
NameValueCollection tempForm = new NameValueCollection
(Error.Form);
tempForm.Remove("__EVENTTARGET");
tempForm.Remove("__EVENTARGUMENT");
tempForm.Remove("__VIEWSTATE");
tempForm.Remove("__EVENTVALIDATION");
RenderCollection(tempForm, "FormData");
}
Original issue reported on code.google.com by [email protected]
on 26 Jun 2007 at 4:03
What steps will reproduce the problem?
1. Add error filtering via configuration.
2. Cause an error to occur that should be filtered.
What is the expected output?
The error should be filtered by the error logging module and error mailing
module.
What do you see instead?
The error is only filtered by the error logging module but still mailed by
the error mailing module.
Original issue reported on code.google.com by azizatif
on 25 Jun 2007 at 9:21
The SQLiteErrorLog implementation is not expected to be used in shared log
scenarios, where multiple applications may share a single back-end
database on a single machine or across a network of machines (SqlErrorLog
is more appropriate for such cases). Consequently the isolation and
filtering per application should be removed.
For background, see also:
- http://www.sqlite.org/whentouse.html
- http://www.sqlite.org/lockingv3.html
Original issue reported on code.google.com by azizatif
on 12 Oct 2007 at 4:56
What steps will reproduce the problem?
Browse to the about page of an ELMAH installation and click the button
that checks for an update.
What is the expected output? What do you see instead?
Expected a message indicating that the version is up to date, but instead
the script throws a JavaScript error saying that currentVersion is
undefined on line 70.
Original issue reported on code.google.com by azizatif
on 8 Dec 2007 at 6:05
What steps will reproduce the problem?
1. Uncomment ErrorMail httpModule in web.config
2. Set <errorMail /> in the web.config without the cc field
3. View the web application from a browser
What is the expected output? What do you see instead?
Expected: No errors, the application should run normally.
Actual Result: The following Error is displayed:
The required configuration setting 'cc' is missing for the error mailing
module.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: Elmah.ApplicationException: The required configuration
setting 'cc' is missing for the error mailing module.
Source Error:
Line 678: if (defaultValue == null)
Line 679: {
Line 680: throw new ApplicationException(string.Format(
Line 681: "The required configuration setting '{0}'
is missing for the error mailing module.", name));
Line 682: }
Source File: c:\Documents and
Settings\gerdesj\Desktop\ELMAH-SVN\src\Elmah\ErrorMailModule.cs Line: 680
Stack Trace:
[ApplicationException: The required configuration setting 'cc' is missing
for the error mailing module.]
Elmah.ErrorMailModule.GetSetting(IDictionary config, String name, String
defaultValue) in c:\Documents and
Settings\gerdesj\Desktop\ELMAH-SVN\src\Elmah\ErrorMailModule.cs:680
Elmah.ErrorMailModule.OnInit(HttpApplication application) in
c:\Documents and
Settings\gerdesj\Desktop\ELMAH-SVN\src\Elmah\ErrorMailModule.cs:132
Elmah.HttpModuleBase.System.Web.IHttpModule.Init(HttpApplication
context) in c:\Documents and
Settings\gerdesj\Desktop\ELMAH-SVN\src\Elmah\HttpModuleBase.cs:54
System.Web.HttpApplication.InitModulesCommon() +66
System.Web.HttpApplication.InitInternal(HttpContext context,
HttpApplicationState state, MethodInfo[] handlers) +814
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext
context) +243
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +106
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +340
What version of the product are you using? On what operating system?
svn build 1.0.8925.1000
Please provide any additional information below.
This field should be an optional field.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2007 at 3:59
One of the additions I made to your product was the addition of
an 'Enabled' attribute when adding httpModules that handle the errors.
This makes it very easy to turn on/off email notifications and such. I
was hoping you might make this change in the shipping code (or add support
for this 'enabled' property to a base class).
The code is a very easy change. In each handler class (like SqlErrorLog
and ErrorMailModule) you make the following change:
add this to class declaration:
private bool _enabled;
add this to the Init() (like in ErrorMailModule) or constructor (like in
SqlErrorLog):
//Init() code...
_enabled = Convert.ToBoolean(GetSetting(config, "enabled",
bool.TrueString)); //WB
//Constructor code
string enabled = (string)config["enabled"]; //WB
if (string.IsNullOrEmpty(enabled)) //WB
_enabled = true; //WB
else //WB
_enabled = Convert.ToBoolean(enabled); //WB
Finally, disable handler if appropriate. For ErrorMailModule, you put
this in the Init() after setting the _enabled from above:
if (_enabled)
application.Error += new EventHandler(OnError);
For SqlErrorLog, you put this in the override of Log():
if (!_enabled)
return;
Original issue reported on code.google.com by [email protected]
on 26 Jun 2007 at 3:53
Can we also have a CC and BCC attribute included into the Component. I was
able to modify the code and add a CC feature to the previous version, but
its a bit of a problem everytime managing the code and modifying it or the
system throws an error if i forget to do so.
And i personally feel its required cause sometimes i want the email to got
to the developer as well directly and a CC for myself to kwp track of the
erros in the system.
Thanks for taking your time and i would really appreciate if this can be
included in the pubic release.
Thanks,
Prashant Atal
Original issue reported on code.google.com by [email protected]
on 16 Aug 2007 at 5:38
Two issues
===========
1) When an error is logged, I want to add contextual information to help in
debugging the error.
For e.g. whenever there is a SQLException while executing a stored
procedure, I generally log the database connection string (without
credentials), sp name, sp parameter names and values etc. I have other
"state" which I want to dump to the log too.
2) I want to log an exception to multiple sinks based on severity of the
exception. I am thinking along the lines of the Logging Application block
configuration - where you can attach multiple listeners based on logentry
category.
Solution I am thinking off
==========================
1) Create an Interface for this purpose. Make sure all custom exceptions
(in all web apps in the company) implement this interface. This interface
will have two read only public properties ( severity and IDictionary). I
decided on dictionary with basic types (string), so that it is easy to
deserialize the Elmah "Error" object.
2) At run time the developer creates an instance of the dictionary and logs
the required state in the dictionary as key, value pairs.
3) At run time set the priority property to appropriate value. Most
probably create an Enum list (high, low, medium etc.)
4) Throw the custom exception.
Now, what is the best way to implement the functionality in ELMAH. My thoughts:
Create some sort of configuration schema in web.config, read it in a new
HttpModule object and send the information to multiple sinks
In the Error class, read the IDictionary object and create XML element for
each key value pair.
Thanks
Arvind
Original issue reported on code.google.com by [email protected]
on 12 Oct 2007 at 5:21
What steps will reproduce the problem?
View elmah.axd on remote server.
What is the expected output? What do you see instead?
Server is in central time zone, however, the footer on the summary screen
and the timestamps for the errors are off by one hour. Had several users
try viewing the page from separate time zones (CDT/EDT) with same result.
What version of the product are you using? On what operating system?
Version 1.0.9225.2224 on Windows 2003.
Please provide any additional information below.
Here is the summary section:
"Powered by ELMAH, version 1.0.9225.2224. Copyright (c) 2007, Atif Aziz.
All rights reserved. Server date is Tuesday, 09 October 2007. Server time
is 18:10:13. All dates and times displayed are in the Central Daylight Time
zone."
In this case the time zone name is correct but the time itself isn't (it
was actually 17:10:13 CDT).
Original issue reported on code.google.com by [email protected]
on 9 Oct 2007 at 10:04
What steps will reproduce the problem?
1. Starting my website with ASP.NET Development Server
2. Before site is shown, Exception is thrown in ErrorFilterModule.cs,
Line67
What is the expected output? What do you see instead?
Exception: Cannot convert string to IHttpModule
What version of the product are you using? On what operating system?
ELMAH 1.0.8922, BETA 1
Problem:
foreach (IHttpModule module in HttpModuleRegistry.GetModules(application))
didn't work. Seems to be a NameValueCollections which is returned.
I had changed it to:
HttpModuleCollection modules = (HttpModuleCollection)
HttpModuleRegistry.GetModules(application);
foreach (string moduleName in modules)
{
IExceptionFiltering filtering = modules[moduleName] as
IExceptionFiltering;
Original issue reported on code.google.com by [email protected]
on 2 Jul 2007 at 10:36
Attachments:
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Please use labels and text to provide additional information.
Original issue reported on code.google.com by azizatif
on 10 Jan 2007 at 7:31
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Please use labels and text to provide additional information.
Original issue reported on code.google.com by azizatif
on 10 Jan 2007 at 7:31
I would propose to implement a Session state serializer. Take a look to
http://www.codeproject.com/aspnet/exploresessionandcache.asp. I think it
would be nice to have something like this.
Another idea would be to save trace messages of a page.
http://msdn2.microsoft.com/en-us/library/b0ectfxd.aspx.
Kind regards
Daniel
Original issue reported on code.google.com by [email protected]
on 26 Jun 2007 at 8:11
First Thank You! It's nice having ELMAH.
A nice Enhancement when viewing errors would be to be able to view the
errors by Website - because you can have one ERROR db to log all errors. So
I can view all, or select from the websites that send error messages to
elmah db.
Therefore, while I'm still getting around to fixing or ignoring various
errors - I still get a lot of them (thanks to the alexa@crawler!!!) But it
would be nice to easily view all errors by a certain website if needed.
Thanks!
Original issue reported on code.google.com by [email protected]
on 22 Aug 2007 at 6:06
Retrieving errors with the XmlFileErrorLog throws an exception if the
folder the logPath configuration attribute points to contains other files,
non-XML or XML but with a different scheme - say, not containing error logs.
Original issue reported on code.google.com by [email protected]
on 8 Nov 2007 at 3:12
Hi,
I'm using ELMAH-1.0-BETA1a-bin on .NET 2.0 app. Using VS2005 and local
development web server. Copied elmah.dll from bin\net2.0\release folder in
zip archive. Followed instructions in sample web.config. When I enable
<errorFilter> in the <elmah> section, I get the following error.
Unable to cast object of type 'System.String' to
type 'System.Web.IHttpModule'.
[InvalidCastException: Unable to cast object of type 'System.String' to
type 'System.Web.IHttpModule'.]
Elmah.ErrorFilterModule.Init(HttpApplication application) +149
System.Web.HttpApplication.InitModulesCommon() +66
System.Web.HttpApplication.InitInternal(HttpContext context,
HttpApplicationState state, MethodInfo[] handlers) +1006
System.Web.HttpApplicationFactory.GetNormalApplicationInstance
(HttpContext context) +241
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +114
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350
I have attached a copy of the web.config. Offending lines are 13-17.
Thanks,
James
Original issue reported on code.google.com by [email protected]
on 3 Aug 2007 at 5:45
Attachments:
Hi Atif,
As discussed in an email thread to you last month...
Please find attached an implementation for Oracle.
Oracle.sql contains the scripts required to create the required database
objects
OracleErrorLog.cs provides the implementation.
I'm using this in a current project without any problems.
It should add nicely into the Beta 2 project.
Regards,
James
Original issue reported on code.google.com by jamesdriscoll71
on 22 Nov 2007 at 10:03
Attachments:
Currently, there is no way to view the detailed XML of an error that has
been logged. More specifically, it is not addressable/accessible via a URL
that can be just typed into the browser. Adding this could also enable
some interesting client tool scenarios where retrieving the error
information in a structured way would be very welcome. It could also add
reach to other environments and frameworks.
Original issue reported on code.google.com by azizatif
on 16 Jul 2007 at 9:24
What steps will reproduce the problem?
1. There is no instructions to any of this
2. None of your text documents have anything
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 22 Sep 2007 at 7:52
I noticed that we are using ntext data type for the sql database, but the
SQL Server 2005 help says,
Important:
ntext, text, and image data types will be removed in a future version of
Microsoft SQL Server. Avoid using these data types in new development
work, and plan to modify applications that currently use them. Use nvarchar
(max), varchar(max), and varbinary(max) instead. For more information, see
Using Large-Value Data Types.
We might want to change it to be forwards compatible
Original issue reported on code.google.com by [email protected]
on 25 Jul 2007 at 2:31
XmlFileErrorLog current enumerates all files in the log path when building
results for GetErrors. It uses Directory.GetFiles to do this and because
that normally yields hidden and system files, it makes the solution
fragile. XmlFileErrorLog should exclude hidden and system files.
Original issue reported on code.google.com by azizatif
on 18 Oct 2007 at 9:47
When an error is logged by the ErrorLogModule, the ID of the logged error
is not available for correlation purposes. For example, it hiders
development of custom error pages that request the user for additional
information and which can then be correlated through the error ID.
Original issue reported on code.google.com by azizatif
on 13 Dec 2007 at 10:38
It should be possible to obtain the entire log in CSV format. This can
enable the use of a number of tools for analyzing and querying the log,
such as LogParser and Microsoft Excel.
- The CSV format used should conform to RFC 4180
(http://www.ietf.org/rfc/rfc4180.txt).
- The CSV output should provide headers in the first line.
- Each record need only contain the summary fields; that is, the
ApplicationName, HostName, Type, Source, Message, User, StatusCode and
Time properties of the Error object.
- The MIME type of the response should be text/csv along with the
header=present option.
Original issue reported on code.google.com by azizatif
on 29 Jul 2007 at 10:04
Add the ability to create UI filters.
For example, we might add a filter link that expands a filter box (dhtml)
in the UI. That would allow us to pick which Error Codes we're interested in.
Potential Filters:
* Date range filters.
* User Filters (starts-with, ends-with, contains)
* Error Filter (starts-with, ends-with, contains)
* Type Filter
* Code Filter
Original issue reported on code.google.com by [email protected]
on 24 Jul 2007 at 11:55
While you can do e.Dismiss() to stop it from being logged, the exception
is still raised. Would be nice if you could also set some flag where the
exception is swallowed also?
Original issue reported on code.google.com by [email protected]
on 23 Jun 2007 at 12:08
I haven't had time to look at the code for this, but we have 194,374
ELMAH_Error rows in our database and trying to go to the digestrss page
always times out the page.
Original issue reported on code.google.com by [email protected]
on 5 Sep 2007 at 6:20
Some, especially public-facing, web sites expect to see a lot of errors
caused by visitors and/or bots. For these sites, receiving an e-mail for
every error or subscribing to the current RSS feed that lists every error
as a separate channel item can be overwhelming. It would therefore help to
add an RSS feed that provides a dialy digest of errors. Every item of this
feed will represent a single day with all errors from that day becoming
part of the item description. The item description will be an HTML
fragment containing a summary of the day's errors (perhaps just the error
messages). Each error summary should be a hyperlink that points to the
error details page.
The issue was created from the discussion in issue #14 (see
http://code.google.com/p/elmah/issues/detail?id=14).
Original issue reported on code.google.com by azizatif
on 20 Jul 2007 at 7:51
I wrote about the issue here:
http://haacked.com/archive/2007/07/24/securely-implement-elmah-for-plug-and-play
-error-logging.aspx
Basically, our sample config makes elmah.axd wide open for anyone to view.
We should provide an example that shows how to secure it.
As a matter of fact, the download link at the bottom of my post includes a
fully functioning app that demonstrates that.
Original issue reported on code.google.com by [email protected]
on 24 Jul 2007 at 8:56
We get thousands of exceptions due to the heavy load on our site. Sending
an email per exception is too cumbersome. Ideally, we could have ELMAH send
a daily summary.
Or, it could send an email for the first time an exception occurs in a
certain time-period (say a day).
Original issue reported on code.google.com by [email protected]
on 13 Jul 2007 at 4:40
I am using a web grid that was crashing and I was wondering why the error
wasn't being logged. After some investigation I found it is throwing an
exception
System.ArgumentException was unhandled by user code
Message="'�', hexadecimal value 0x01, is an invalid character."
Source="System.Xml"
And the value of the string being written (I am using Infragistics
UltraWebGrid)
ChangedCells�UltraWebGrid1rc_9_1�zz�UltraWebGrid1rc_9_2�zz�ActiveCell�Ultra
WebGrid1rc_9_2
Died on [assembly: Elmah.Scc("$Id: HttpValuesCollection.cs 25 2007-05-04
23:24:03Z azizatif $")] line 146
writer.WriteEndElement();
---------------------------------------------------------------------------
Exception Details
System.ArgumentException was unhandled by user code
Message="'�', hexadecimal value 0x01, is an invalid character."
Source="System.Xml"
StackTrace:
at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch,
Char* pDst, Boolean entitize)
at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char*
pSrc, Char* pSrcEnd)
at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text)
at System.Xml.XmlWellFormedWriter.WriteString(String text)
at System.Xml.XmlWriter.WriteAttributeString(String localName,
String value)
at Elmah.HttpValuesCollection.Elmah.IXmlExportable.ToXml(XmlWriter
writer)
at Elmah.Error.WriteCollection(XmlWriter writer, String name,
NameValueCollection collection)
at Elmah.Error.WriteInnerXml(XmlWriter writer)
at Elmah.Error.ToXml(XmlWriter writer)
at Elmah.SqlErrorLog.Log(Error error)
at WebSettings.DataOperation.UpdateXmlByValueDescription(DataSet
ds, String xml) in e:\Userdata\sameera\Dev2.7
\App_Code\Settings\DataOperation.cs:line 433
at WebSettings.subLocationList.Update() in
e:\Userdata\sameera\Dev2.7\Settings\subLocationList.aspx.cs:line 480
at WebSettings.subLocationList.btnSave_Click(Object sender,
EventArgs e) in e:\Userdata\sameera\Dev2.7
\Settings\subLocationList.aspx.cs:line 113
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument)
at
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.Ra
isePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
---------------------------------------------------------------------------
Call stack
[External Code]
Elmah.DLL!Elmah.HttpValuesCollection.Elmah.IXmlExportable.ToXml
(System.Xml.XmlWriter writer = {System.Xml.XmlWellFormedWriter}) Line 146
C#
> Elmah.DLL!Elmah.Error.WriteCollection(System.Xml.XmlWriter writer
= {System.Xml.XmlWellFormedWriter}, string name = "form",
System.Collections.Specialized.NameValueCollection collection =
{Elmah.HttpValuesCollection}) Line 488 C#
Elmah.DLL!Elmah.Error.WriteInnerXml(System.Xml.XmlWriter writer =
{System.Xml.XmlWellFormedWriter}) Line 475 + 0x11 bytes C#
Elmah.DLL!Elmah.Error.ToXml(System.Xml.XmlWriter writer =
{System.Xml.XmlWellFormedWriter}) Line 439 C#
Elmah.DLL!Elmah.SqlErrorLog.Log(Elmah.Error error = {Access to the
path 'E:\Userdata\sameera\Dev2.7\Configuration\LocationList.xml' is
denied.}) Line 170 C#
App_SubCode_Settings.ebplpfnq.dll!
WebSettings.DataOperation.UpdateXmlByValueDescription(System.Data.DataSet
ds = {System.Data.DataSet}, string xml = "LocationList.xml") Line 433 +
0x30 bytes C#
App_Web_xvi5k5qk.dll!WebSettings.subLocationList.Update() Line 480
+ 0x12 bytes C#
App_Web_xvi5k5qk.dll!WebSettings.subLocationList.btnSave_Click
(object sender = {Text = "<img src='../Common/images/icon_save.gif'
border=\"0\">Save "}, System.EventArgs e = {System.EventArgs}) Line 113 +
0x7 bytes C#
[External Code]
Original issue reported on code.google.com by [email protected]
on 5 Nov 2007 at 1:13
Recently received issues when trying to handle errors where the message
contains line breaks. e.g. when connecting to a database with incorrect
login credentials the message returned is across two lines:
What steps will reproduce the problem?
===============
1. Change connection string dbname or login credentials so that
authentication will fail (I used sql server 2000).
2. Enter debugging
3. InvalidArgumentException is thrown at line 233 of ErrorMailModule.cs -
"The specified string is not in the form required for a subject."
What is the expected output? What do you see instead?
===============
Cannot open database requested in login 'DATABASENAME'. Login fails.
Login failed for user 'PCNAME\ASPNET'.
If the message is configured to be included in the subject line when using
the ErrorMailModule, an exception is thrown indicating an invalid subject line.
What version of the product are you using? On what operating system?
===============
Win2K3, .NET 2.0, SQL Server 2000
Please provide any additional information below.
This issue has been recreated from the still active gotdotnet workspace
which will be discontinued shortly,
http://www.gotdotnet.com/workspaces/bugtracker/bugdetails.aspx?id=f18bab11-162c-
4267-a46e-72438c38df6f&bugid=005e4343-93c1-42c4-b4b0-d4aaab5751d9
Suggested fix on line 233 of ErrorMailModule.cs
===============
Replace:
mail.Subject = string.Format(subjectFormat, error.Message, error.Type);
With
mail.Subject = string.Format(subjectFormat, Regex.Replace( error.Message,
"[\r\n]+", " ", RegexOptions.Compiled ), error.Type);
Original issue reported on code.google.com by [email protected]
on 7 Jun 2007 at 8:35
Does the download version specified here, work with .Net 2.0, like this
one:
http://geekswithblogs.net/angeleyes/archive/2006/06/01/80357.aspx
?
Original issue reported on code.google.com by [email protected]
on 28 May 2007 at 9:53
I am interested in an enhancement.
I am using a custom principal\identity to store my user’s roles. I store
the principal in session and on a new request restore the custom principal
in Global.asax in the Application_AcquireRequestState event.
I would like to secure Elmah. I see the suggested methodology is to use
URL authorization but we do not use URL authorization. I would like to
secure Elmah by looking at the roles stored in my custom principal but I
cannot restore my principal from session because session state is not
exposed by default in HttpHandlers.
Exposing session in an HttpHandler is simply a matter of implementing
IReadOnlySessionState. IReadOnlySessionState is a marker interface so
there is no coding involved in implementing the interface.
Thanks for Elmah and for the consideration of my request.
Glenn
.ps If you ever were going to include session information in Elmah (issue
12) you would need to do this anyway.
Original issue reported on code.google.com by [email protected]
on 28 Nov 2007 at 3:52
In some of the applications I have built, I expect certain exceptions to be
thrown - usually of the security type. It would be great if there was an
easily configurable way to filter out exceptions with Elmah.
Based upon Atif's suggestions, I went ahead and built out a VB version of
this myself inherited from GotDotNet.Elmah.ErrorMailModule that is
configurable in the web.config. This is the first time I am sharing code
online so please be gentle :)
Original issue reported on code.google.com by jeffmagill
on 5 Jun 2007 at 1:53
Attachments:
My Database already has 194,374 exceptions logged and bringing up the error
log is really slow. I took a look and noticed that the code copies every
row into a temp table.
There are more efficient methods of paging than this. I'll attach two
options. 1 for SQL 2000 and one screaming fast option for SQL 2005.
We might want a SQL 2005 provider so we can take advantage of the huge
speed improvements.
Original issue reported on code.google.com by [email protected]
on 5 Sep 2007 at 6:16
Attachments:
The monospaced font used for the exception detail appears illegibly small
in Firefox but okay in IE.
Original issue reported on code.google.com by azizatif
on 27 Jul 2007 at 8:41
The reliance on stored procs means I can't use ELMAH for other databases.
Personally, I'd like to see ELMAH make use of Subsonic which would buy
other db support for free.
However, given the relatively few queries ELMAH has to support, another
option might be to have a provider model. One that uses StoredProcs, the
other that uses Prepared SQL Queries from code so that it works with Sqlite.
Original issue reported on code.google.com by [email protected]
on 27 Jul 2007 at 7:01
In most of my applications the user must be logged on in order to use the
application. I would like to modify the ELMAH such that it is possible to
configure ELMAH such that information tied to the user currently logged on
could be logged with the error so that when I am researching an error I can
contact the specific user that generated the error so as to find out how to
be able to reproduce the error.
I would appreciate any suggestions as to how to approach making this
enhancement.
Thanks,
Casey
Original issue reported on code.google.com by [email protected]
on 6 Nov 2007 at 6:30
Added the others log providers as comment
Original issue reported on code.google.com by [email protected]
on 26 Jul 2007 at 6:15
Attachments:
This is the stack trace:
System.NullReferenceException: Object reference not set to an instance of
an object.
at
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.I
ExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
This is happening both in ASP.NET 1.1 and 2.0, with a subtle difference.
The environment is XP2 OS, IIS 5.1 web server, and .NET frameworks 1.1 and 2.0.
These are the steps to reproduce the issue:
1. browse to elmax.axd handler to show the error list.
2. click the "DOWNLOAD LOG" link
3. either download the file or cancel the transfer
4. refresh the page
5. a NullReferenceException exception has been logged by ELMAH and appears
in the error list
Subtle difference in .NET 1.1/2.0: if the csv log is downloaded again and
again, for each try in .NET 1.1 a new NullReferenceException gets logged,
while in .NET 2.0 it happens just on the first attempt to download the log
file.
Original issue reported on code.google.com by [email protected]
on 3 Nov 2007 at 12:06
What steps will reproduce the problem?
1. Have one web site(as a container) which contains many different web
applications
2. Integrate ELMAH into the web site
3. An error "A" occurs in one of the sub-webapplication
4. Access websiteUrl/elmah.axd to view the error log
5. ERROR: the error "A" does not display in the page.
What is the expected output? What do you see instead?
the error A should be displayed.
but it does not.
What version of the product are you using? On what operating system?
ELMAH-1.0-BETA2-src.zip
Please provide any additional information below.
I have tracked the issue and find a way to fix it.
This issue is caused by the sp: ELMAH_GetErrorsXml
The sp only gets the errors which have the same application. It does not
consider this situation: A web site contains multiple sub-applications.
For example, let’s have a website http://localhost:48900 whose application
will be recorded as /LM/W3SVC/1915900280/Root. And there are some sub-
applications under the http://localhost:48900 such as v.20080102.01 which
is also a web application. You can access the v.20080102.01 by
http://localhost:48900/v.20080102.01. Ironically, if there is an error
occurs in v.20080102.01, the application will be recorded
as /LM/w3svc/1915900280/ROOT/v.20080102.01
When we access http://localhost:48900/elmah.axd, the sp gets all the
errors whose application is /LM/W3SVC/1915900280/Root, but ignore these
errors occurred in the sub-application whose application is
LM/w3svc/1915900280/ROOT/v.20080102.01
<b>Solution</b>:
So the solution is to modify the sp. Change all the code “Application =
@Application” to "Application like @Application + '%'" then it will get
all the error which occurred in the sub-application. (3 places)
and do the samething in ELMAH_GetErrorXml(1 places)
Original issue reported on code.google.com by [email protected]
on 4 Jan 2008 at 6:39
To send the error reports to multiple email addresses, I made the
following change:
In ErrorMailModule ReportError() method, locate this:
mail.To.Add(new MailAddress(recipient));
and replace with this:
string[] toAddresses = recipient.Split(';');
foreach (string toAddress in toAddresses)
{
mail.To.Add(new MailAddress(toAddress));
}
Now, you can put multiple addresses in the 'To' attribute of the errorMail
setup like:
<errorMail from="[email protected]" to="[email protected];
[email protected]" subject="Website Error" async="true"/>
Original issue reported on code.google.com by [email protected]
on 26 Jun 2007 at 3:58
Unable to view the details of a error while using the XmlFileErrorLog as
the data store.
This happens because the error is stored in a filename with the format,
error-{0}-{1}.xml where 0 = timestamp and 1 = errorId.
When the method GetError(string id) tries to read the error file the search
pattern is wrong since it doesn't take into account the timestamp part of
the filename.
(Line203 - XmlFileErrorLog.cs)
string[] files = Directory.GetFiles(LogPath, string.Format("error-{0}.xml",
id));
To fix this issue, line 203 of XmlFileErrorLog.cs should read
string[] files = Directory.GetFiles(LogPath,
string.Format("error-*-{0}.xml", id));
Original issue reported on code.google.com by [email protected]
on 6 Sep 2007 at 1:34
When the following code is executed:
Error error = new Error(ex, HttpContext.Current);
GotDotNet.Elmah.ErrorLog.Default.Log(error);
Include an option to perform the "errorMail" action either automatically
when .Log() is called or by specifying that an email should be sent in the
parameters.
See the discussion at:
http://groups.google.com/group/elmah/browse_thread/thread/b17cb4b5308b8013
Original issue reported on code.google.com by [email protected]
on 2 Aug 2007 at 10:33
The stylesheet used to display the error log pages is not printer-friendly
(see src/Elmah/ErrorLog.css). In particular, some regions that are styled
as scrollable for online viewing experience render clipped when printed.
Original issue reported on code.google.com by azizatif
on 17 Jul 2007 at 9:35
Need to add a roadmap of releases and milestones to serve as a guidance
for proritizing issues as well as to give visitors an indication of the
project status.
Original issue reported on code.google.com by azizatif
on 25 Jul 2007 at 2:45
In the current version of ELMAH, the application column is set
to '/LM/W3SVC/170/ROOT' by the SQLLogger.
In this beta version, it is set to '/'.
Original issue reported on code.google.com by [email protected]
on 16 Jul 2007 at 10:58
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.