找回密码
 立即注册

QQ登录

只需一步,快速开始

moer 活字格认证
金牌服务用户   /  发表于:2022-5-13 23:56  /   查看:1173  /  回复:5
20金币
Request Exception Happened-------------------------------Path/Home/CalcParamValueUserName:ttsm{  "ClassName": "System.Exception",  "Message": "Can't find command",  "Data": null,  "InnerException": null,  "HelpURL": null,  "StackTraceString": "   at Forguncy.Server2.Controllers.HomeController.CalcParamValue(CalcParamValueParam param)   at lambda_method(Closure , Object )   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()   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()--- End of stack trace from previous location where exception was thrown ---   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": -2146233088,  "Source": "Forguncy.Server2",  "WatsonBuckets": null}

附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

5 个回复

倒序浏览
moer活字格认证
金牌服务用户   /  发表于:2022-5-14 09:11:32
沙发


本地调试是好的,  发布到服务器上就报错了。是什么原因?  

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
moer活字格认证
金牌服务用户   /  发表于:2022-5-14 10:16:21
板凳
同样的数据库链接,本地调试查询正常,发布到服务器查询返回500.
发布到服务器后,就不能打印日志输出了。
所以,把查询语句用异常捕获包一下,如下图, 返回异常信息到前端显示。


查询异常信息如下:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Erik.Xue讲师达人认证 悬赏达人认证 活字格认证 Wyn认证
超级版主   /  发表于:2022-5-16 10:47:51
地板
您好,先确认一下,设置变量命令这里取的数据表是外联数据库的表吗?

如果是的话,发布前的数据库连接和发布后的数据库连接是否一致?
回复 使用道具 举报
moer活字格认证
金牌服务用户   /  发表于:2022-5-16 11:23:37
5#
是外联数据库。发布前的数据库连接和发布后的数据库连接是一致的。没有修改过。  

不再跟踪这个问题了。 数据库服务器不变, 换了活字格服务器就好了。 数据库和活字格服务器不在同一台机子上。
回复 使用道具 举报
Erik.Xue讲师达人认证 悬赏达人认证 活字格认证 Wyn认证
超级版主   /  发表于:2022-5-16 12:12:23
6#
好的,如有其他问题欢迎随时发帖提问哈~
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部