找回密码
 立即注册

QQ登录

只需一步,快速开始

biwei

初级会员

7

主题

23

帖子

234

积分

初级会员

积分
234
biwei
初级会员   /  发表于:2021-9-18 11:02  /   查看:2651  /  回复:1
 用MSSQL编写好视图之后,再调用视图。常出现不知原因的超时(在SQL分析器里直接执行只用了3秒)
/Home/GetTableDataWithOffset
Internal Server Error
Request Exception Happened-------------------------------
Path/Home/GetTableDataWithOffset
UserName:administrator
{
  "ClassName": "System.Data.SqlClient.SqlException",
  "Message": "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.",
  "Data": {
    "$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib",
    "HelpLink.ProdName": "Microsoft SQL Server",
    "HelpLink.ProdVer": "10.50.1600",
    "HelpLink.EvtSrc": "MSSQLServer",
    "HelpLink.EvtID": "-2",
    "HelpLink.BaseHelpUrl": "https://go.microsoft.com/fwlink",
    "HelpLink.LinkId": "20476",
    "SqlError 1": "System.Data.SqlClient.SqlError: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."
  },
  "InnerException": {
    "$type": "System.ComponentModel.Win32Exception, Microsoft.Win32.Primitives",
    "ClassName": "System.ComponentModel.Win32Exception",
    "Message": "等待的操作过时。",
    "Data": null,
    "InnerException": null,
    "HelpURL": null,
    "StackTraceString": null,
    "RemoteStackTraceString": null,
    "RemoteStackIndex": 0,
    "ExceptionMethod": null,
    "HResult": -2147467259,
    "Source": null,
    "WatsonBuckets": null,
    "NativeErrorCode": 258
  },
  "HelpURL": null,
  "StackTraceString": "   at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__126_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at ForguncyDataAccess.DataAccess.a(String A_0, String A_1, DataBaseType A_2, DbParameter[] A_3)
   at ForguncyDataAccess.DataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at Forguncy.Server2.b.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at ForguncyDataAccess.DataAccess.GetDetailDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct)
   at ForguncyDataAccess.DataAccess.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct)
   at Forguncy.Server2.b.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct)
   at Forguncy.Server2.Controllers.HomeController.a(List`1 A_0, CurrentRowInfo A_1, Int32 A_2, OffsetSqlCondition A_3, Boolean A_4, ISqlCondition A_5, TopSqlConditionBase A_6, OrderBySqlCondition A_7, List`1 A_8, IDataAccess A_9)
   at Forguncy.Server2.Controllers.HomeController.a(List`1 A_0, CurrentRowInfo A_1, Int32 A_2, Int32 A_3, Boolean A_4, QueryCommandInfo A_5, List`1 A_6, String A_7, OffsetSqlCondition A_8, Boolean A_9, ColumnFilterQuery[] A_10, Boolean A_11, List`1 A_12)
   at Forguncy.Server2.Controllers.HomeController.a(List`1 A_0, CurrentRowInfo A_1, Int32 A_2, Int32 A_3, Boolean A_4, QueryCommandInfo A_5, List`1 A_6, String A_7, OffsetSqlCondition A_8, Boolean A_9, ColumnFilterQuery[] A_10, Boolean A_11, List`1 A_12)
   at Forguncy.Server2.Controllers.HomeController.GetTableDataWithOffset(GetTableDataWithOffsetParam data)
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Forguncy.Server2.KatanaMiddleware.ReportsMiddleware.InvokeAsync(HttpContext context, ICacheService cacheService, IReportServerService reportServerService)
   at Forguncy.KatanaMiddleware.ServerCommandMiddleware.InvokeAsync(HttpContext context)
   at Forguncy.KatanaMiddleware.j.InvokeAsync(HttpContext context)
   at Forguncy.KatanaMiddleware.i.InvokeAsync(HttpContext context)
   at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.InvokeAsync(HttpContext context)
   at ForguncyServerCommon.HttpHeaderMiddlewareBase.InvokeAsync(HttpContext context)
   at Forguncy.KatanaMiddleware.p.InvokeAsync(HttpContext context)",
  "RemoteStackTraceString": null,
  "RemoteStackIndex": 0,
  "ExceptionMethod": null,
  "HResult": -2146232060,
  "Source": "Core .Net SqlClient Data Provider",
  "WatsonBuckets": null,
  "Errors": null,
  "ClientConnectionId": "869f7c56-bb19-427e-8bbc-75bceabf8b2a"
}

1 个回复

倒序浏览
David.Zhong讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2021-9-18 13:54:53
沙发
大佬, 你用的是哪个版本的设计器?表格中数据有多少,查询条件是怎么写的呢?
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部