Storage: SQL Server
Install for SQL Server is fairly straightforward, you’ll need to do the following:
- Give the application permissions to a database.
- Run the SQL to create the Exceptions table.
- Configure the application to use this error store, either in the web.config or in code.
Coniguration
Web.config example:
<ErrorStore type="SQL" connectionString="Data Source=.;Initial Catalog=Exceptions;Uid=Exceptions;Pwd=iloveerrors" />
ASP.NET Core JSON example:
{
"Exceptional": {
"Store": {
"ApplicationName": "Samples (ASP.NET Core)",
"Type": "SQL",
"ConnectionString": "Data Source=.;Initial Catalog=Exceptions;Uid=Exceptions;Pwd=iloveerrors"
}
}
}
C# Code example:
Exceptional.Configure("My Application", new SQLErrorStore("Data Source=.;Initial Catalog=Exceptions;Uid=Exceptions;Pwd=iloveerrors"));