An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()'


 错误提示

请求发生错误!An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call.An error occurred while updating the entries. See the inner exception for details.

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - 信号灯超时时间已到)

 

An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()'

解决方案

C# 全选
 builder.UseSqlServer(connection, x =>
            {
                x.UseNetTopologySuite();
                //解决此问题:
                //请求发生错误!An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call.An error occurred while updating the entries. See the inner exception for details.
                //A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - 信号灯超时时间已到)
                x.EnableRetryOnFailure(
                    maxRetryCount: 5,
                    maxRetryDelay: TimeSpan.FromSeconds(30),
                    errorNumbersToAdd: new int[] { 2 });
            });

 

版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:provider: SSL Provider, error: 0 - 证书链是由不受信任的颁发机构颁发的
下一篇:The object cannot be deleted because it was not found in the ObjectStateManager
评论列表

发表评论

评论内容
昵称:
关联文章

An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()'
HTTP Error 500.31 - Failed to load ASP.NET Core runtime 解决方案
How to changing the asp.net development server port?
Nuget引用VS编译错误 CefSharp.Common is unable to proceeed as your current Platform is 'AnyCPU'
提交GIT服务器失败,提示Git failed with a fatal error.Permission denied,.vs/Server/sqlite3/db.lock
安装GIT msi 程序出现the error code is 2503解决方案
[下载]DataSet Remoting(DataSetSurrogate)
VS编译报错:LC.exe - Assert Failure | Unknown Hard Error
C#.Net对象内存模型及堆/栈数据结构详解 (一)
System.NotSupportedException:“The entity or complex type 'CSFramework.EF.tb_MyUser' cannot be constructed in a LINQ to Entities query.”
[原创]超牛Outlook导航导控件(Outlook Navigation Panel)
C#.Net对象内存模型及堆/栈数据结构详解 (四)
the pre-login handshake. (provider: SSL Provider, error: 0
异步实现Socket Server&Client
C/S开发框架系统异常处理机制(Exception Handler)
打开设计窗体报错:To prevent possible data loss before loading the designer
The Database principal owns a schema in the database
SQL使用LIKE查询模糊匹配多个特殊标点符号的数据
软件开发与设计 - CMS内容管理系统-IFNuke(修改自DNN)网站源码数据库表结构
C#用ListView实现XP分组样式(图)