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?
Please make sure that the NHibernate Profiler client points to the same port as your NHibernateProfiler.Initialize()
method. The default port is 22897
.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With