Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Using ELMAH with MySQL
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
  16 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
 
stumpthegeek  
View profile  
 More options May 8, 6:39 pm
From: stumpthegeek <stumptheg...@gmail.com>
Date: Fri, 8 May 2009 15:39:29 -0700 (PDT)
Local: Fri, May 8 2009 6:39 pm
Subject: Using ELMAH with MySQL
I'm building a website backed by a MySql 5.0x database and I was
wondering if it would be possible to use ELMAH with it. If so what
steps do I need to take to make ELMAH work with MySql?

    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options May 10, 7:32 pm
From: Atif Aziz <aziza...@gmail.com>
Date: Mon, 11 May 2009 01:32:10 +0200
Local: Sun, May 10 2009 7:32 pm
Subject: Re: [ELMAH] Using ELMAH with MySQL

You need to provide an implementation of the ErrorLog class that knows how
to store and retrieve errors from a MySql database. You only need to
implement 3 methods of the class, namely Log, GetError and GetErrors.

- Atif

On Sat, May 9, 2009 at 12:39 AM, stumpthegeek <stumptheg...@gmail.com>wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 5, 4:49 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Fri, 5 Jun 2009 01:49:10 -0700 (PDT)
Local: Fri, Jun 5 2009 4:49 am
Subject: Re: Using ELMAH with MySQL
Hi,

I am facing problem in implementing those 3 methods of class. As I
dont have much idea about how the solution has been created,
specifically how it adds the shortcut of classes to solution. So I am
not able to add my new MySqlErrorLog.cs class to 2008 solution and how
would i compile it to include which dll in my application. So it would
be of great help if you can provide me the mysql implementation or
guide me the way to do it.

Thanks and Regards,
Rajiv Kalra.

On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:


    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options Jun 5, 4:52 am
From: Atif Aziz <aziza...@gmail.com>
Date: Fri, 5 Jun 2009 10:52:18 +0200
Local: Fri, Jun 5 2009 4:52 am
Subject: Re: [ELMAH] Re: Using ELMAH with MySQL

> dont have much idea about how the solution has been created,
> specifically how it adds the shortcut of classes to solution. So I am
> not able to add my new MySqlErrorLog.cs class to 2008 solution and how
> would i compile it to include which dll in my application.

Don't bother adding it to the 2008 solution from ELMAH. Write your MySQL
implementation in a separate project that references ELMAH.

On Fri, Jun 5, 2009 at 10:49 AM, Rajiv Kalra <rajivkalra1...@gmail.com>wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 5, 6:15 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Fri, 5 Jun 2009 03:15:25 -0700 (PDT)
Local: Fri, Jun 5 2009 6:15 am
Subject: Re: Using ELMAH with MySQL
Hi,

Could you please provide me the mysql implementation for Elmah?

Regards,
Rajiv Kalra

On Jun 5, 1:52 pm, Atif Aziz <aziza...@gmail.com> wrote:


    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options Jun 5, 6:20 am
From: Atif Aziz <aziza...@gmail.com>
Date: Fri, 5 Jun 2009 12:20:36 +0200
Local: Fri, Jun 5 2009 6:20 am
Subject: Re: [ELMAH] Re: Using ELMAH with MySQL

> Could you please provide me the mysql implementation for Elmah?

Sorry, I don't know MySQL. Never used it so I am not in the best position to
implement one.

On Fri, Jun 5, 2009 at 12:15 PM, Rajiv Kalra <rajivkalra1...@gmail.com>wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 5, 8:51 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Fri, 5 Jun 2009 05:51:25 -0700 (PDT)
Local: Fri, Jun 5 2009 8:51 am
Subject: Re: Using ELMAH with MySQL
Hi,
ok i know mysql, so please guide me to resolve the problems i am
getting so that we can together accomplish this task.
I have included mysqlerrorlog in my own project after changing it from
sqlserver to mysql and facing the following issue.

CS0122: 'Elmah.ConnectionStringHelper' is inaccessible due to its
protection level

On Jun 5, 3:20 pm, Atif Aziz <aziza...@gmail.com> wrote:


    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options Jun 5, 8:57 am
From: Atif Aziz <aziza...@gmail.com>
Date: Fri, 5 Jun 2009 14:57:05 +0200
Local: Fri, Jun 5 2009 8:57 am
Subject: Re: [ELMAH] Re: Using ELMAH with MySQL

> so please guide me to resolve the problems i am
> getting so that we can together accomplish this task.

Sure, let's try. :)

CS0122: 'Elmah.ConnectionStringHelper' is inaccessible due to its

> protection level

Unless you plan on supporting .NET 1.x, you don't really need
ConnectionStringHelper to resolve connection strings. Just use the standard
.NET 2.0 way of reading connection strings from configuration and remove
code using ConnectionStringHelper.

On Fri, Jun 5, 2009 at 2:51 PM, Rajiv Kalra <rajivkalra1...@gmail.com>wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 5, 9:15 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Fri, 5 Jun 2009 06:15:57 -0700 (PDT)
Local: Fri, Jun 5 2009 9:15 am
Subject: Re: Using ELMAH with MySQL
ok i will try this way and respond back to you .

On Jun 5, 5:57 pm, Atif Aziz <aziza...@gmail.com> wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 8, 3:03 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Mon, 8 Jun 2009 00:03:12 -0700 (PDT)
Local: Mon, Jun 8 2009 3:03 am
Subject: Re: Using ELMAH with MySQL
Hi Atif,

I tried the way told by you. Following are some more issues i am
facing.

-->Error     4       'Elmah.Mask' is inaccessible due to its protection level        D:
\myappname\App_Code\MySQLErrorLog.cs    63      30
mysolution: what i have tried is accessed the application name same
way as connection string.

-->Error     5       'MySql.Data.MySqlClient.MySqlCommand' does not contain a
definition for 'ExecuteXmlReader' and no extension method
'ExecuteXmlReader' accepting a first argument of type
'MySql.Data.MySqlClient.MySqlCommand' could be found (are you missing
a using directive or an assembly reference?)    D:\myappname\App_Code
\MySQLErrorLog.cs       159     44

comment: I think you wont be able to tell me about this as this is
related to mysql

-->Error     6       'Elmah.Debug' is inaccessible due to its protection level       D:
\myappname\App_Code\MySQLErrorLog.cs    283     13

On Jun 5, 6:15 pm, Rajiv Kalra <rajivkalra1...@gmail.com> wrote:


    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options Jun 8, 3:54 am
From: Atif Aziz <Atif.A...@skybow.com>
Date: Mon, 8 Jun 2009 09:54:47 +0200
Local: Mon, Jun 8 2009 3:54 am
Subject: RE: [ELMAH] Re: Using ELMAH with MySQL

> 'Elmah.Mask' is inaccessible due to its protection level

You can just add this to your project verbatim. It's a very small helper class. Its Mask.NullString method is not even needed if you're working with C# 2 or later since it can be replaced by the null-coalescing operator (??).

> 'Elmah.Debug' is inaccessible due to its protection level

Again, either include it verbatim in your project or just replace with calls to System.Diagnostics.Debug


'MySql.Data.MySqlClient.MySqlCommand' does not contain a
definition for 'ExecuteXmlReader'
<<

I think you start with SqlErrorLog as your base code. ExecuteXmlReader uses the native XML capabilities of SQL 2000+. You may need to adjust this for MySQL if it doesn't offer similar features. You may want to look at how SQLiteErrorLog saves as loads the XML.

- Atif


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 8, 6:37 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Mon, 8 Jun 2009 03:37:01 -0700 (PDT)
Local: Mon, Jun 8 2009 6:37 am
Subject: Re: Using ELMAH with MySQL
Hi,

these problems have been solved as guided by you..but now the issue is
how should i specify my MySQLErrorLog.cs class in web.config. As i am
doing the same way as it is done with sqllite

        <!--<errorLog type="Elmah.SQLiteErrorLog, Elmah"
connectionStringName="ELMAH.SQLite"/>-->
                <errorLog type="Elmah.MySQLErrorLog, Elmah"
connectionStringName="ELMAH.MySQL" />
and
        <!--<add name="ELMAH.SQLite" connectionString="Data Source=|
DataDirectory|errors.s3db"/>-->
                <add name="ELMAH.MySQL" connectionString="Database=dbname; Data
Source=dbip; User Id=root; Password=pwd;"/>

but its not working. what can be the problem?

On Jun 8, 12:54 pm, Atif Aziz <Atif.A...@skybow.com> wrote:


    Reply to author    Forward  
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 Jun 8, 6:44 am
From: James_2JS <jamesdrisc...@btinternet.com>
Date: Mon, 8 Jun 2009 03:44:43 -0700 (PDT)
Local: Mon, Jun 8 2009 6:44 am
Subject: Re: Using ELMAH with MySQL
Hi there!

Your problem is that you are trying to find MySQLErrorLog within
Elmah.dll... when in fact it resides in your own dll...
So you should be doing something like this...

<errorLog type="YourNamespace.MySQLErrorLog, YourDll"
connectionStringName="ELMAH.MySQL" />

Cheers,

James

On Jun 8, 11:37 am, Rajiv Kalra <rajivkalra1...@gmail.com> wrote:


    Reply to author    Forward  
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.
Lee Kelleher  
View profile  
 More options Jun 8, 7:13 am
From: Lee Kelleher <leekelle...@gmail.com>
Date: Mon, 8 Jun 2009 04:13:39 -0700 (PDT)
Local: Mon, Jun 8 2009 7:13 am
Subject: Re: Using ELMAH with MySQL
(Rajiv contacted me off-list, via my blog post about Elmah/Umbraco
integration: http://blog.leekelleher.com/2009/04/23/integrating-elmah-with-umbraco/
)

I have written a MySqlErrorLog class (in a standalone project) that
references the Elmah.dll, extending the ErrorLog class.

The VS solution files are available to download here:
http://groups.google.com/group/elmah/web/Elmah.MySql.zip

You just need to compile them.  I created the VS solution in VS2008 -
so let me know if you have any problems opening the solution.

For the record, I am in no way an expert in MySql, I know enough to do
what I need - so if there are any improvements to be made, please feel
free to contribute!

Thanks,
- Lee Kelleher

On Jun 5, 11:15 am, Rajiv Kalra <rajivkalra1...@gmail.com> wrote:


    Reply to author    Forward  
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.
Atif Aziz  
View profile  
 More options Jun 8, 8:17 am
From: Atif Aziz <aziza...@gmail.com>
Date: Mon, 8 Jun 2009 14:17:56 +0200
Local: Mon, Jun 8 2009 8:17 am
Subject: Re: [ELMAH] Re: Using ELMAH with MySQL

> problem is that you are trying to find MySQLErrorLog within
> Elmah.dll... when in fact it resides in your own dll...

James is right on. I noticed earlier, however, when you mentioned the
compiler errors, that you may have your log implementation code sitting in
the special App_Code directory so I wanted to point out that you can just
use "App_Code" as the assembly name (the actual one is unknown due to
dynamic compilation). In other words:

<errorLog
  type="MySQLErrorLog, App_Code"
  connectionStringName="ELMAH.MySQL" />

If your type lives in a namespace, then prepend it to MySQLErrorLog.

- Atif

On Mon, Jun 8, 2009 at 12:44 PM, James_2JS <jamesdrisc...@btinternet.com>wrote:


    Reply to author    Forward  
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.
Rajiv Kalra  
View profile  
 More options Jun 8, 9:32 am
From: Rajiv Kalra <rajivkalra1...@gmail.com>
Date: Mon, 8 Jun 2009 06:32:23 -0700 (PDT)
Local: Mon, Jun 8 2009 9:32 am
Subject: Re: Using ELMAH with MySQL
Hi All,

Thanks a lot to all of you guys Atif, James and specially to Lee who
has provided me the working solution. It was great experience working
with you guys.

On Jun 8, 5:17 pm, Atif Aziz <aziza...@gmail.com> wrote:


    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google