As it is my practice to always fill out the assembly info for all my applications, I have elected to populate this field from My.Application.Info.Title
which I just figured out how to access programmatically. To set this field in ELMAH, I set the ApplicationName
value of my SqlErrorLog
object like so:
Dim se As New Elmah.SqlErrorLog(ConnectionStrings("Elmah").ConnectionString)
se.ApplicationName = My.Application.Info.Title
The assembly info can be set by opening the project properties -> Application tab -> click Assembly Information... -> set "Title" value.
Now when you call the Log
function for this object, it will create a database entry including the Application Name.