【发布时间】:2012-03-28 10:25:56
【问题描述】:
我刚刚下载了 nhibernate profiler,但我不知道为什么它不起作用。 据我所知,在选项 - 编辑默认连接中设置连接字符串就足够了。
我正在使用 sql server,我已经像这样复制了我的连接字符串
Data Source=.\SQLEXPRESS;Initial Catalog=DB_xxx_MyDb;Integrated Security=True;
在我的应用程序的调试模式下,执行我的应用程序时,我在 nhibernate 分析器中没有任何内容。
更新: 添加了对我的 mvc3 项目的引用
HibernatingRhinos.Profiler.Appender.v4.0.dll
全球.asax
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
#if DEBUG
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();
#endif
}
我做了以下步骤
- 启动 NhProf.exe
- 开始调试 mvc 应用,我要分析这些应用查询
在 Nhibernate 分析器中没有出现任何内容。许可证有效期为 32 天。 为什么?我还应该做什么?
第二次更新:
我尝试参考HibernatingRhinos.Profiler.Appender.dll 仍然没有工作。
尝试使用 options-settings-listen 端口来设置我的 asp 开发人员。服务器端口,现在是 5442。
依然没有。我有点困惑。
只是提到我的应用程序有效,我的连接字符串有效,我能够从我的数据库中获取数据,...
我在 NHProfiler 文件夹中的 log.txt 文件有这个内容
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()
【问题讨论】:
标签: nhibernate