1. Add Sql Config Data
<?xml version="1.0"?>
<configuration>
  <elmah2>
    <loggers>
      <logger Type="elmah2.SqlServer.SqlLogger, elmah2.SqlServer" ConnectionString="TestDB" Name="Dev-SqlServer" />
    </loggers>    
  </elmah2>
  <connectionStrings>
    <add name="TestDB" connectionString="Data Source=localhost;Initial Catalog=Elmah;Persist Security Info=True;User ID=AppLogin;Password=AppLogin"/>
  </connectionStrings>
</configuration>

  • The ConnectionString attributereferences the connection name in the connectionstrings section, this is required
  • The Name attribute gives the logger a name and is required, also needs to be unique

2. Add the following lines to the <assembly> section on web.config
<add assembly="elmah2.SqlServer" />
  • You can either add the reference here or reference the assembly directly in the web project

Last edited Jun 16, 2010 at 1:33 AM by iamkrillin, version 2

Comments

No comments yet.