Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8112405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:29:30+00:00 2026-06-06T02:29:30+00:00

First I unplug my network cable. Then I try to connect to SQL Server

  • 0

First I unplug my network cable.

Then I try to connect to SQL Server from within C# using an SqlClient.SqlConnection object and a connection string that either does not specify a connection timeout (and thus defaults to 15 seconds): Integrated Security=SSPI;Persist Security Info=False;Data Source=MYSERVER;Database=MYDB"

or a connection string that does specify a timeout, even shorter at 5 seconds: "Integrated Security=SSPI;Persist Security Info=False;Data Source=MYSERVER;Database=MYDB;Connect Timeout=5"

Either way, the call to connection.Open returns after 42 seconds with my timeout error. If I plug my network cable back in earlier, I can provoke an error sooner. Why is the connection timeout having no effect? Is this documented somewhere? Is there a way around it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:29:33+00:00Added an answer on June 6, 2026 at 2:29 am

    Connect Timeout applies ONLY when it is able to resolve the server and waits for a connection.

    As per MSDN also, Connect Timeout is the length of time (in seconds – default 15) to wait for a connection to the server before terminating the attempt and generating an error.

    Note:
    5 seconds is too less for networking hardwares to detect the network is available or not. It should not be less than 10 seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code to accept bad server certificates: ServicePointManager.ServerCertificateValidationCallback = delegate(object s,
first, sorry for my bad English. I try to rewrite url generated from Form
First, I am using Live connect, as documents says live id will be obsolete
First off, let me clarify the platforms we are using. We have an ASP.NET
First time posting here, will try to be succinct. This is a classic 'can't
First, my computer is windows 7 64bit, with xampp(apache, php, mysql), vmware server, java
First, I am a SQL noob, second if there is a better solution that
First Im a noob in LINQ ! Then, the thing is that I have
First I will show you example tables that my issue pertains to, then I
First, let's get the security considerations out of the way. I'm using simple authentication

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.