correctly log the ApplicationName value

The ErrorLog's ApplicationName value should be passed to the ElmahEntity's ApplicationName property.

You can reference the SqlErrorLog.cs file from the ELMAH project:  
http://code.google.com/p/elmah/source/browse/src/Elmah.SqlServer/SqlErrorLog.cs