Slow application startup when using log4net AdoNetAppender

time to read 1 min | 91 words

Just saw my application startup shoot through the roof. It got from the merely annoying to the absolutely ridicilous.

At first I cast blame around, but after a while I tried the first method of investigating, which was to attach to the process and hit pause, then inspect what it is currently doing. The stack trace pointed out to the ConfigureAndWatch method on XmlConfigurator, which was stuck on SqlConnection.Open, which lead me to figure out that my connection string was pointing at the wrong place, which led to a slow startup...