-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core SqlConnection ConnectTimout 15 less than not work? #1126
Comments
@OdaShinsuke instead of error number please try to write the message or print the stack please and share them with us as well if possible. Thank you. |
10061 = connection refused |
Thanks.
Stacktrace. .NET Core 5
.NET Framework
|
@OdaShinsuke the workaround for this issue is to add |
… than not work?
… 15 less than not work?" This reverts commit cde0430.
确实如此,目前使用 5.0.0版本的也是一样,加过配置后可以了 |
.NET Core SqlConnection ConnectTimout 15 less than not work?
Microsoft.Data.SqlConnection ConnectTimeout behaves differently between .NET Framework and .NET Core.
Environment:
To reproduce
Prerequisites
Stop the SQL Server service.
.NET Core 5 or 3.1
.NET Framework 4.8
In .NET Core, even if I set Connect Timeout = 1, it still seems to work with the default value of 15.
SqlException.Number is different.
Expected behavior
If I set Connect Timeout to less than 15 in .NET Core, I want it to work for less than 15 seconds.
The text was updated successfully, but these errors were encountered: