Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Regarding GetErrorCount
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sampath Kumar  
View profile  
 More options Apr 30 2012, 9:13 am
From: Sampath Kumar <anytimesamp...@gmail.com>
Date: Mon, 30 Apr 2012 06:13:35 -0700 (PDT)
Local: Mon, Apr 30 2012 9:13 am
Subject: Regarding GetErrorCount
Hi Team,

I have been using GetErrorCount method of ErrorLogDataSourceAdapter
class to get the total error count. There is a small discrepancy in
the count returned by the method when I have compared it by counting
number of rows in elmah_error table from sqlserver. Can someone please
let me know if there is any default filter applied to
ErrorLogDataSourceAdapter.

Thanks,
Sampath


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James_2JS  
View profile  
 More options Apr 30 2012, 9:24 am
From: James_2JS <jamesdrisc...@btinternet.com>
Date: Mon, 30 Apr 2012 06:24:07 -0700 (PDT)
Local: Mon, Apr 30 2012 9:24 am
Subject: Re: Regarding GetErrorCount

Hi Sampath,

Try running this against your SQL Server database:

SELECT [Application], Count(*)
FROM [ELMAH_Error]
Group By [Application]

Does that shed some light on the difference?

Cheers,

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sampath Kumar  
View profile  
 More options May 2 2012, 1:36 am
From: Sampath Kumar <anytimesamp...@gmail.com>
Date: Tue, 1 May 2012 22:36:20 -0700 (PDT)
Local: Wed, May 2 2012 1:36 am
Subject: Re: Regarding GetErrorCount
As suggested offline, following is the config section details I have
used for elmah

<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" />
      <section name="errorTweet" requirePermission="false"
type="Elmah.ErrorTweetSectionHandler, Elmah" />
</sectionGroup>

<httpModules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
      <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
      <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>

<httpHandlers>
      <add verb="POST,GET,HEAD" path="elmah.axd"
type="Elmah.ErrorLogPageFactory,   Elmah" />
</httpHandlers>

---------------------------------------------------------------------------

The following is the result of the query u have asked me to run on my
database.

SELECT [Application], Count(*)
FROM [ELMAH_Error]
Group By [Application]

Application                            (No column name)
---------------------------------------------------------------------------
/                                              118
/lm/w3svc/1/ROOT/ShellMOC       6

--------------------------------------------------------------------------- ---------------------------

Regards,
Sampath

****************************************
On Apr 30, 6:24 pm, James_2JS <jamesdrisc...@btinternet.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James_2JS  
View profile  
 More options May 2 2012, 6:47 am
From: James_2JS <jamesdrisc...@btinternet.com>
Date: Wed, 2 May 2012 03:47:25 -0700 (PDT)
Local: Wed, May 2 2012 6:47 am
Subject: Re: Regarding GetErrorCount

Can you also post your <elmah> section please?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sampath Kumar  
View profile  
 More options May 2 2012, 6:50 am
From: Sampath Kumar <anytimesamp...@gmail.com>
Date: Wed, 2 May 2012 03:50:45 -0700 (PDT)
Local: Wed, May 2 2012 6:50 am
Subject: Re: Regarding GetErrorCount
Sorry, forgot to include this..
***************************************************
<elmah>
    <security allowRemoteAccess="0" />
    <!--
            Use to log errors to Microsoft SQL Server 2000 or 2005
            using ASP.NET 2.0. Set value of connectionStringName
attribute
            to the name of the connection string settings to use from
            the <connectionStrings> section.
            -->
    <errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="ElmahDB" />
    <!--
            Use to send error reports by e-mail and adjust the
attributes
            according to settings desired. Note that only the from and
            to attributes are required. The rest are optional and may
            be removed. If the SMTP server does not require
authentication,
            you MUST remove the userName and password attributes or
            set them to empty values (resulting in zero-length
strings).
            If you are using ELMAH compiled for .NET Framework 1.x,
then
            the to attribute may contain multiple recipient addresses,
            each of which must be delimited by a semi-colon(;). If you
are
            using ELMAH compiled for .NET Framework 2.0 or later, then
the
            to attribute may contain multiple recipient addresses,
            each of which must be delimited by a comma (,).
-->
    <errorMail from="" to="" subject="" priority="Low" async="false"
smtpPort="25" smtpServer="" useSsl="true" noYsod="false" />
  </elmah>

------------
Regards,
Sampath

**********************************************
On May 2, 3:47 pm, James_2JS <jamesdrisc...@btinternet.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James_2JS  
View profile  
 More options May 2 2012, 8:00 am
From: James_2JS <jamesdrisc...@btinternet.com>
Date: Wed, 2 May 2012 05:00:51 -0700 (PDT)
Local: Wed, May 2 2012 8:00 am
Subject: Re: Regarding GetErrorCount

Hi Sampath,

As you can see from the results of the query, ELMAH has logged errors under
two different application names.
The SqlServerErrorLog (and others) allows this functionality so that you
can have one central SQL Server logging all unhandled exceptions for a
variety of applications whilst distinguishing between them all.
The application name can be set by setting an attribute on the <errorLog>
element as follows:

<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ElmahDB"
applicationName="Your Application Name" />  

If this attribute is not set, ELMAH tries to infer it as can be seen by the
following code:
http://code.google.com/p/elmah/source/browse/src/Elmah/ErrorLog.cs?re...

http://code.google.com/p/elmah/source/browse/src/Elmah/ErrorLog.cs?re...

http://code.google.com/p/elmah/source/browse/src/Elmah/ErrorLog.cs?re...

In your case, I'm not entirely sure why ELMAH has inferred two different
application names!

However, it's easy to remedy the situation by:

1) Setting the application name in web.config (as per above)
2) Running an update script on your SQL database to set the application
name for your existing errors.

Once you've done this, everything should work as you expect!

Hope this helps.
Cheers,

James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »