Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Connection timeout

Connection timeout

Scheduled Pinned Locked Moved C#
helpsysadminsecuritytutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msomar
    wrote on last edited by
    #1

    my connection is:

    <add name="AdNetConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=AdNet;Integrated Security=True" providerName="System.Data.SqlClient" />

    the error is Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding and I try to add the proberty

    ConnectionTimeout=200

    to my connection but this error occurred The Connection Timeout attribute is not declared. so please guide me to solve this problem.

    L R 2 Replies Last reply
    0
    • M msomar

      my connection is:

      <add name="AdNetConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=AdNet;Integrated Security=True" providerName="System.Data.SqlClient" />

      the error is Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding and I try to add the proberty

      ConnectionTimeout=200

      to my connection but this error occurred The Connection Timeout attribute is not declared. so please guide me to solve this problem.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      msomar wrote:

      Timeout expired.

      Your query is to slow to complete only for 200 seconds.You would better try to optimize it. If your query execution time can't be reduced set ConnectionTimeout property to 0, which means no limit.It's preferred to be avoided but sometimes it's not possible.

      Life is a stage and we are all actors!

      1 Reply Last reply
      0
      • M msomar

        my connection is:

        <add name="AdNetConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=AdNet;Integrated Security=True" providerName="System.Data.SqlClient" />

        the error is Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding and I try to add the proberty

        ConnectionTimeout=200

        to my connection but this error occurred The Connection Timeout attribute is not declared. so please guide me to solve this problem.

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        Can you post a bit more of your code? I suspect that your connection string isn't right, as the server should respond in 200 mS easily. Are you using a local installation of SQL Server Express? If so, it should have a name for the instance, not ".\SQLEXPRESS." It may be that it isn't responding because it's never notified on the request. For instance, on my setup, the SQL Server installation is named "BAAL\SQLEXPRESS" and shortening the name in the connection string never works. The shortcut ".\" may not be valid for this application, so try adding the full name of the computer that hosts the server and see if that helps.

        "A Journey of a Thousand Rest Stops Begins with a Single Movement"

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups