title: Activation error occured while trying to get instance of type LogWriter, key ""?
body: <p>I have asp.net web site. I added reference of  <code>Microsoft.Practices.EnterpriseLibrary.Logging.dll</code> to the site. </p>
  
  <p>in web.cofig file, I defined like below. </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /&gt;
    &lt;/configSections&gt;
    &lt;loggingConfiguration name="Logging Application Block" tracingEnabled="true"
      defaultCategory="General" logWarningsWhenNoCategoriesMatch="true"&gt;
      &lt;listeners&gt;
        &lt;add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging"
          listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging"
          fileName="C:\Temp\RollingFlatFile.log" footer="----------------------------------------"
          formatter="Text Formatter" header="----------------------------------------"
          rollFileExistsBehavior="Increment" rollInterval="None" rollSizeKB="20"
          timeStampPattern="yyyy-MM-dd" maxArchivedFiles="3" traceOutputOptions="None"
          filter="All" /&gt;
        &lt;/listeners&gt;
      &lt;formatters&gt;
        &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
          template="Timestamp: {timestamp(local)}{tab}Message: {message}{tab}Category: {category}{tab}Priority: {priority}{tab}EventId: {eventid}{tab}ActivityId: {property(ActivityId)}{tab}Severity: {severity}{tab}Title:{title}{tab}"
          name="Brief Format Text" /&gt;
        &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
          template="Timestamp: {timestamp}{tab}Message: {message}{tab}Category: {category}{tab}Priority: {priority}{tab}EventId: {eventid}{tab}Severity: {severity}{tab}Title: {title}{tab}Activity ID: {property(ActivityId)}{tab}Machine: {localMachine}{tab}App Domain: {localAppDomain}{tab}ProcessId: {localProcessId}{tab}Process Name: {localProcessName}{tab}Thread Name: {threadName}{tab}Win32 ThreadId:{win32ThreadId}{tab}Extended Properties: {dictionary({key} - {value}{tab})}"
          name="Text Formatter" /&gt;
      &lt;/formatters&gt;
      &lt;logFilters&gt;
        &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.PriorityFilter, Microsoft.Practices.EnterpriseLibrary.Logging"
          minimumPriority="2" maximumPriority="99" name="Priority Filter" /&gt;
        &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogEnabledFilter, Microsoft.Practices.EnterpriseLibrary.Logging"
          enabled="true" name="LogEnabled Filter" /&gt;
        &lt;add type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.CategoryFilter, Microsoft.Practices.EnterpriseLibrary.Logging"
          categoryFilterMode="AllowAllExceptDenied" name="Category Filter"&gt;
          &lt;categoryFilters&gt;
            &lt;add name="BlockedByFilter" /&gt;
          &lt;/categoryFilters&gt;
        &lt;/add&gt;
      &lt;/logFilters&gt;
      &lt;categorySources&gt;
        &lt;add switchValue="All" name="Important"&gt;
          &lt;listeners&gt;
            &lt;add name="Formatted EventLog TraceListener" /&gt;
            &lt;add name="Rolling Flat File Trace Listener" /&gt;
          &lt;/listeners&gt;
        &lt;/add&gt;
      &lt;/categorySources&gt;
      &lt;specialSources&gt;
        &lt;allEvents switchValue="All" name="All Events" /&gt;
        &lt;notProcessed switchValue="All" name="Unprocessed Category"&gt;
          &lt;listeners&gt;
            &lt;add name="UnprocessedFlatFile" /&gt;
          &lt;/listeners&gt;
        &lt;/notProcessed&gt;
        &lt;errors switchValue="All" name="Logging Errors &amp;amp; Warnings"&gt;
          &lt;listeners&gt;
            &lt;add name="Formatted EventLog TraceListener" /&gt;
          &lt;/listeners&gt;
        &lt;/errors&gt;
      &lt;/specialSources&gt;
    &lt;/loggingConfiguration&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When I run the code exception happening below place.</p>
  
  <pre><code>defaultWriter = EnterpriseLibraryContainer.Current.GetInstance&lt;LogWriter&gt;();
  //Activation error occured while trying to get instance of type LogWriter, key ""
  </code></pre>
  
  <p>How to resolve this?</p>