SqlConnection object hangs on Open() when deployed on Terminal Services server RRS feed

  • Question

  • I am having an issue deploying an application on a server running Windows Terminal Services.  The programs hangs when attempting to connect to SQL Server 2005 using the following code for users that are not Administrators of the server. 


    I have isolated the issue down to the following two lines of code:

    SqlConnection conn = new SqlConnection("Insert connection string here");



    Connecting to the Terminal Services server using remote desktop and logging on with a user that does not have administrative privileges will hang the application for at least 20 minutes.  No exceptions are thrown.


    Any help would be appreciated.


    Wednesday, August 15, 2007 11:03 PM

All replies

  • Did you set any timeout for the connection? Did you check in Sql Profiler if request to open connection actually came to the server?


    Thursday, August 16, 2007 10:28 AM
  • Thanks for the reply.


    Sql Profiler did not help and no I did not set a specific timeout value.  It turns out that performing a Windows update on the Windows 2003 Terminal Server and on the .NET 2.0 package specifically fixed the issue.


    Thanks again.

    Tuesday, August 21, 2007 12:23 PM