I've just downloaded nhibernate profiler and I cannot figure why it is not working. As far as I know, it should be enough to set Connection string inside Options - Edit default connection.
I'm using sql server and I've copied my connection string like this
Data Source=.\SQLEXPRESS;Initial Catalog=DB_xxx_MyDb;Integrated Security=True;
In debug mode of my app I have nothing inside nhibernate profiler when executing my app.
Update: Added reference to my mvc3 project
HibernatingRhinos.Profiler.Appender.v4.0.dll
Global.asax
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
#if DEBUG
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();
#endif
}
I made following steps
Nothing appears in Nhibernate profiler. Licence is working for 32 days. Why? What else should I do?
Second update:
I tried with reference HibernatingRhinos.Profiler.Appender.dll
still no working.
Tried with options-settings-listen port to set my asp dev. server port, right now is 5442.
Still nothing. I'm bit confused.
Just to mention that my app works, my connection string works, I am able to fetch data from my db, ...
My log.txt file inside NHProfiler folder have this content
2012-03-28 20:31:01,374 [1] INFO Rhino.Licensing.LicenseValidator [(null)] - License expiration date is 04/29/2012 00:00:00
2012-03-28 20:31:01,662 [1] DEBUG Rhino.Licensing.LicenseValidator [(null)] - License accepted for NHibernate Profiler
2012-03-28 20:31:02,461 [6] INFO HibernatingRhinos.Profiler.Client.App [(null)] - Checking for updates...
2012-03-28 20:31:25,072 [4] ERROR HibernatingRhinos.Profiler.Client.App [(null)] - Error while checking for updates: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 216.121.112.229:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at NAppUpdate.Framework.Sources.SimpleWebSource.GetUpdatesFeed()
at NAppUpdate.Framework.UpdateManager.CheckForUpdates(IUpdateSource source, Action`1 callback)
at NAppUpdate.Framework.UpdateManager.<>c__DisplayClass2.<CheckForUpdateAsync>b__1()
Have you initialized the NHibernateProfiler in your app/websites?
Something like this in the Applicattion_Start() or Main()
#if DEBUG
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();
#endif
Also remember to reference the dll
HibernatingRhinos.Profiler.Appender.v4.0.dll
After returning default listening port inside options-settings everything works. Finally. Thanks @Iridio.
Btw if anyone needs to conclude:
Step 1: Add reference
Step 2: Inside Global.asax Application_Start() add these line
#if DEBUG
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();
#endif
Step 3: Start NhProf, inside Options-Connection string add your conn.string.
Step 4: Run your app.
The default listening port is 22897. Do not change this.
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