当前位置:   article > 正文

EFCore 调试远程SqlServer数据库提示信号灯超时时间已到

an exception has been raised that is likely due to a transient failure. cons

  背景

  最近在使用EFCore去连接阿里云上面的数据库进行开发的时候,当自己在Debug模式下总是提示下面的报错信息,然后找了好久都没有解决,报错信息如下:  

  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.
  ---> System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - 信号灯超时时间已到)
  ---> System.ComponentModel.Win32Exception: 信号灯超时时间已到 

  而且这个在连接到本地数据库的时候没有出现过这个问题,所以初步确定是由于连接到阿里云上面的数据库时候,由于一些网络问题造成在调试状态下出现这个问题,那么到底该进行怎样的配置才能够解决这个问题呢?最近经过多方努力找到了这个问题的解决方案,先来看看是如何解决的。

<
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/891837
推荐阅读
相关标签
  

闽ICP备14008679号