Skip to content
Automatically creates an Elmah database on SQL Server using Entity Framework migrations.
C# Pascal Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget
Elmah.SqlServer.EFInitializer
nuget-pack
.gitignore
CodeMaid.settings
Elmah.SqlServer.EFInitializer.sln
Elmah.SqlServer.EFInitializer.sln.DotSettings
Elmah.SqlServer.EFInitializer.v2.ncrunchsolution
LICENSE.md
NuGetPack.bat
README.md
icon.png

README.md

Elmah.SqlServer.EFInitializer

Build status

Automatically creates an Elmah database on SQL Server using Entity Framework migrations.

Installation

This project is available as a NuGet package. It can be installed from the Visual Studio Package Manager Console using Install-Package Elmah.SqlServer.EFInitializer.

Configuration

By default the database will be created using the DefaultConnection connection string.

If you wish to use a different connection string, you should declare a named string in the connectionStrings section of Web.config and edit the connectionStringName attribute on the elmah / errorLog configuration element. For example:

<configuration>
  <!-- Other configuration omitted -->
  <connectionStrings>
    <add name="ElmahConnection"
         connectionString="Data Source=(local);Initial Catalog=Elmah;Integrated Security=True;"
         providerName="System.Data.SqlClient" />
  </connectionStrings>
  <elmah>
    <errorLog type="Elmah.SqlErrorLog, Elmah" 
              connectionStringName="ElmahConnection" />
  </elmah>
</configuration>

Usage note

The intent of this package is only to automate the creation of a backing SQL Server database for Elmah and provide enough configuration to do the basic logging. Errors will be logged to the database, but you will also need to install something like the main Elmah package or Elmah.MVC to view them within the site.

Acknowledgements

Credit must go to the creators of Elmah.SqlServer, the SQL from that project is what I used for the migrations.

You can’t perform that action at this time.