NHibernate Profiler does not see a request from my ASP.NET MVC application

I am using NHProf with ASP.NET MVC 3.

I inserted

HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();

in my Application_Start method, but NHProf still doesn't see my sessions and doesn't detect anything.

What could be the source of my problem?

+5
source share
3 answers

Are you configuring log4net?

You can look here:

How to configure NHibernate Profiler so that I can enable / disable it without changing the code?

And a sample from my web.config:

<appender name="NHProfAppender"
      type="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender, 
      HibernatingRhinos.Profiler.Appender.NHibernateLog4Net">
    <sink value="tcp://127.0.0.1:22897" />
  </appender>
  <logger name="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender.Setup">
    <appender-ref ref="NHProfAppender"/>
  </logger>
+1
source

Verify that the NHibernate Profiler client points to the same port as your method NHibernateProfiler.Initialize(). The default port is 22897.

+5

Maybe there is a problem with the firewall? Verify that the port is the same and that the port can be accessed. Is your latest code working as expected?

0
source

All Articles