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?
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:
> 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?
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:
> 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:
> > 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?- Hide quoted text -
> 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:
> 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:
> > 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:
> > > 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?- Hide quoted
> text -
> > 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:
> > 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:
> > > 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:
> > > > 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?- Hide quoted
> > text -
> 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:
> > > 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:
> > > 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:
> > > > 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:
> > > > > 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?- Hide quoted
> > > text -
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:
> > 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:
> > 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:
> > > > 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:
> > > > 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:
> > > > > 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:
> > > > > > 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?- Hide quoted
> > > > text -
> > > > > - Show quoted text -- Hide quoted text -
> 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:
> 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:
> > > 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:
> > > 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:
> > > > > 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:
> > > > > 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.
> > > > > On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:
> > > > > > 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:
> > > > > > > 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?- Hide
> quoted
> > > > > text -
> > > > > > - Show quoted text -- Hide quoted text -
> > 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:
> > 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:
> > > > 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:
> > > > 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:
> > > > > > 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:
> > > > > > 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.
> > > > > > On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:
> > > > > > > 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:
> > > > > > > > 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?- Hide
> > quoted
> > > > > > text -
> > > > > > > - Show quoted text -- Hide quoted text -
> > > > > - Show quoted text -- Hide quoted text -
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:
> ok i will try this way and respond back to you .
> On Jun 5, 5:57 pm, Atif Aziz <aziza...@gmail.com> wrote:
> > > 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:
> > > 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:
> > > > > 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:
> > > > > 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:
> > > > > > > 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:
> > > > > > > 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.
> > > > > > > On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:
> > > > > > > > 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.
> > > > > > > > > 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?- Hide
> > > quoted
> > > > > > > text -
> > > > > > > > - Show quoted text -- Hide quoted text -
> > > > > > - Show quoted text -- Hide quoted text -
> '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.
-----Original Message-----
From: elmah@googlegroups.com [mailto:elmah@googlegroups.com] On Behalf Of Rajiv Kalra
Sent: Monday, June 08, 2009 9:03 AM
To: ELMAH
Subject: [ELMAH] 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:
> ok i will try this way and respond back to you .
> On Jun 5, 5:57 pm, Atif Aziz <aziza...@gmail.com> wrote:
> > > 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:
> > > 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:
> > > > > 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:
> > > > > 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:
> > > > > > > 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:
> > > > > > > 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.
> > > > > > > On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:
> > > > > > > > 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.
> > > > > > > > > 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?- Hide
> > > quoted
> > > > > > > text -
> > > > > > > > - Show quoted text -- Hide quoted text -
> > > > > > - Show quoted text -- Hide quoted text -
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:
> > '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
> -----Original Message-----
> From: elmah@googlegroups.com [mailto:elmah@googlegroups.com] On Behalf Of Rajiv Kalra
> Sent: Monday, June 08, 2009 9:03 AM
> To: ELMAH
> Subject: [ELMAH] 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:
> > ok i will try this way and respond back to you .
> > On Jun 5, 5:57 pm, Atif Aziz <aziza...@gmail.com> wrote:
> > > > 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:
> > > > 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:
> > > > > > 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:
> > > > > > 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:
> > > > > > > > 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:
> > > > > > > > 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.
> > > > > > > > On May 11, 4:32 am, Atif Aziz <aziza...@gmail.com> wrote:
> > > > > > > > > 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.
> > > > > > > > > > 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?- Hide
> > > > quoted
> > > > > > > > text -
> > > > > > > > > - Show quoted text -- Hide quoted text -
> > > > > > > - Show quoted text -- Hide quoted text -
> > > > > - Show quoted text -- Hide quoted text -
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...
> 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
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:
> 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:
> > > 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:
> > > 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:
> > > > 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:
> > > > > 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?- Hide quoted
> > > text -
> 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:
> 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...
> On Jun 8, 11:37 am, Rajiv Kalra <rajivkalra1...@gmail.com> wrote:
> > 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
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:
> > 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:
> 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:
> > 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...
> > On Jun 8, 11:37 am, Rajiv Kalra <rajivkalra1...@gmail.com> wrote:
> > > 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