NHibernate Profiler doesn't see request from my ASP.NET MVC application

2.1k views Asked by At

I'm 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 show up anything.

What could be the source of my problem?

3

There are 3 answers

1
Baidaly On BEST ANSWER

Do you setup a log4net configuration?

You can look here:

How do I configure NHibernate Profiler so I can enable/disable it without changing code?

And 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>
5
Fitzchak Yitzchaki On

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

0
Colin Asquith On

Could be a firewall issue? Make sure the port is the same and the port can be accessed. Your latest code is running as expected?