Is there an easy way to distinguish between those multiple applications if they're on the same host?
Yes, this is done automatically, but you can also set an application name in the web.config of each application. For example, if you're using SqlErrorLog, the configuration entry would look like this:
<errorLog type="Elmah.SqlErrorLog, Elmah"
connectionStringName="..."
applicationName="WebApp1" />
- Atif
From: elmah@googlegroups.com [mailto:elmah@googlegroups.com] On Behalf Of Jeff Schoolcraft
Sent: Tuesday, June 10, 2008 2:00 PM
To: elmah@googlegroups.com
Subject: [ELMAH] Re: one db - multiple websites?
Is there an easy way to distinguish between those multiple applications if they're on the same host?
On Tue, Jun 10, 2008 at 7:21 AM, Atif Aziz <Atif.A
...@skybow.com<mailto:Atif.A
...@skybow.com>> wrote:
Is it possible to use ELMAH on
multiple websites using a single database? These sites will be on the
same server.
<<
Yes, there are two ways to achieve this:
1. You setup each application for ELMAH. This involves dropping the ELMAH binaries into the bin folder of each web site and then making the necessary changes to web.config.
2. You download the sources, strong-name the assembly by signing it (requires re-compilation) and then deploy it into the GAC. You then setup machine.config to enable ELMAH. Since that is inherited, all web site now and in the future will be using ELMAH without further ado.
In either case, you can setup a single SQL Server or Oracle database to log the errors. In case 1, you need to specify the same connection string in the configuration of each application. In case 2, you specify the connection string in the machine.config and this gets inherited by all web applications (with each application still having the option to override it).
Hope this helps,
- Atif
-----Original Message-----
From: elmah@googlegroups.com<mailto:elmah@googlegroups.com> [mailto:elmah@googlegroups.com<mailto:elmah@googlegroups.com>] On Behalf Of seanrocks
...@googlemail.com<mailto:seanrocks
...@googlemail.com>
Sent: Tuesday, June 10, 2008 12:50 PM
To: ELMAH
Subject: [ELMAH] one db - multiple websites?
Hi
sorry if this has been asked before. Is it possible to use ELMAH on
multiple websites using a single database? These sites will be on the
same server.
thanks and regards
Sean
--
Jeff Schoolcraft
http://thequeue.net/blog/
Microsoft MVP