gpt4 book ai didi

mvc-mini-profiler - 小型分析器空引用异常

转载 作者:行者123 更新时间:2023-12-04 20:53:10 37 4
gpt4 key购买 nike

当我正在运行的存储过程执行 mini-profiler 时,会抛出一个空引用并导致我的应用程序停止。在这种情况下,SP 不返回任何内容。

这是堆栈跟踪:

   at MvcMiniProfiler.MiniProfiler.AddSqlTiming(SqlTiming stats) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\MiniProfiler.cs:line 274
at MvcMiniProfiler.SqlTiming..ctor(DbCommand command, ExecuteType type, MiniProfiler profiler) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\SqlTiming.cs:line 137
at MvcMiniProfiler.SqlProfiler.ExecuteStartImpl(DbCommand command, ExecuteType type) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\SqlProfiler.cs:line 39
at MvcMiniProfiler.SqlProfilerExtensions.ExecuteStart(SqlProfiler sqlProfiler, DbCommand command, ExecuteType type) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\SqlProfiler.cs:line 93
at MvcMiniProfiler.MiniProfiler.MvcMiniProfiler.Data.IDbProfiler.ExecuteStart(DbCommand profiledDbCommand, ExecuteType executeType) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\MiniProfiler.IDbProfiler.cs:line 14
at MvcMiniProfiler.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\Users\sam\Desktop\mvc-mini-profiler\MvcMiniProfiler\Data\ProfiledDbCommand.cs:line 158
at System.Data.Common.DbCommand.ExecuteReader()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
at NetINFO.NetINFODataContext.usp_SRM_GetPlansByType(Nullable`1 sRM_ID, Nullable`1 sRM_PlanTypeID) in C:\Code\netinfo\NetInfo.Web\App_Data\NetINFO.designer.cs:line 1949
at NetINFO.NetCMG.SRM.GetSRMPlans(Int32 pPlanType) in C:\Code\netinfo\NetInfo.Web\pages\NetCMG\classes\SRM.cs:line 673
at NetINFO.NetCMG.SRM.Validate() in C:\Code\netinfo\NetInfo.Web\pages\NetCMG\classes\SRM.cs:line 540
at NetCMG.Controls.TicketErrorsCtl.ValidateTicket(SRM Ticket) in C:\Code\netinfo\NetInfo.Web\pages\NetCMG\Controls\TicketErrorsCtl.ascx.cs:line 29
at NetCMG.Controls.TicketErrorsCtl.Page_Load(Object sender, EventArgs e) in C:\Code\netinfo\NetInfo.Web\pages\NetCMG\Controls\TicketErrorsCtl.ascx.cs:line 16
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

最佳答案

我终于想出了我上面问题的解决方案。该错误发生在对网格使用 sql 数据源的旧版 webforms 应用程序上。 sql 数据源正在使用“ProviderName”属性。一旦我删除了这个属性,一切都开始工作了。

关于mvc-mini-profiler - 小型分析器空引用异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8128379/

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