Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 532
GaGar1n Avatar asked Dec 07 '11 09:12

GaGar1n


2 Answers

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

like image 183
Fitzchak Yitzchaki Avatar answered Oct 18 '22 12:10

Fitzchak Yitzchaki


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>
like image 24
Baidaly Avatar answered Oct 18 '22 12:10

Baidaly