Tracing not working in Asp.net MVC 5 site

854 Views Asked by At

I have a custom trace listener (inherits TraceListener) setup that logs the trace information to a database.

  <system.diagnostics>
    <sources>
      <source name="MyApplication" switchValue="Information" />
    </sources>
    <trace>
      <listeners>
        <add name="sqlLogListener" type="MyApplication.SqlDatabaseTraceListener, MyApplication" initializeData="connectionStringName:=errorTrace" />
      </listeners>
    </trace>
  </system.diagnostics>

This works fine on my dev machine, but on the production machine, I'm unable to get any of the trace messages to show up on the database. My guess is that this might be a iis configuration issue. I've tested the connection to the errorTrace database, and I can successfully query and show information.

I've looked around anywhere and cannot find any relevant information for this behavior. Also, my production machine is using iis 7.5.

UPDATE: I'm using windows authentication. My production machine and dev machine are both hooked to to the same domain. Also, my dev machine is iis8.5 and production machine is iis7.5, but this should not be the issue.

0

There are 0 best solutions below