gpt4 book ai didi

c# - MiniProfiler 结果 UI 显示空名称,因为使用了 SqlServerStorage

转载 作者:太空宇宙 更新时间:2023-11-03 12:31:55 26 4
gpt4 key购买 nike

我们一直在使用 MiniProfiler 作为分析我们的 ASP.NET MVC 5 应用程序性能的简单方法。它在开发中运行良好,但一旦我们将应用程序放到网络场上,我们很快意识到我们需要使用不同/共享的存储介质。

我们通过放置

迁移到 SqlServerStorage

MiniProfiler.Settings.Storage = new SqlServerStorage(System.Configuration.ConfigurationManager.ConnectionStrings["SqlDb"].ConnectionString)

进入 MvcApplication.Application_Start (Global.asax)

我们使用 StackExchange.Profiling.Storage.SqlServerStorage.TableCreationScript 中的脚本创建了 MiniProfiler 表。

自从使用 SqlServerStorage 后,我们发现 MiniProfiler UI 不再正常运行;我们得到以下信息: screenshot

如您所见,名称列是空的。有人知道我是否需要配置其他东西吗?

最佳答案

这在 MiniProfiler v4 中已修复(目前处于 alpha 阶段)。不幸的是,v3 没有在 SQL Server 中存储 Name 字段。这是listed as a breaking change in the upgrade notes因为它需要 a schema addition .我无法在 v3 中进行此更改,因为这是一个重大更改。

期待 MiniProfiler v4 在接下来的几周内退出 alpha,因为我们在生产中对其进行大量测试,并推进到 beta 和发布。

关于c# - MiniProfiler 结果 UI 显示空名称,因为使用了 SqlServerStorage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42421303/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com