A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)


  • Has anyone else seen this error? 

    I thought I had my environment worked out.


    Wednesday, April 18, 2012 5:47 PM

All replies

  • Haven't seen it myself... have you taken a look at this post?

    My Blog: dotnetlore.com/lightswitch Twitter: @DotNetLore

    Wednesday, April 18, 2012 7:09 PM
  • Yep, but the fix was to uninstall vs11 and framework 4.5 :( not a very good fix if you want to keep using it :)

    Trying a repair right now.


    Wednesday, April 18, 2012 7:13 PM
  • Update...

    I was able to get this to work but only by establishing that the connection uses Named Pipes.

    I don't think this is a solution but it is a workaround for those who have this problem.

    By the way this could have something to do with kerberos as I have not set my spn for the new box.  If anyone checking into this is also having trouble if you are using kerberos or windows security I will post further updates.


    Thursday, April 19, 2012 3:31 PM
  • Update...

    This does not fix the connection if the server cannot be made to support named pipes :(


    Thursday, April 19, 2012 4:14 PM
  • Derek,

    Only a suggestion - Do you need to open up the Firewall - Port 88 or the likes? Not sure what additional ports, if any, are required for kerberos!


    E tenebris lux. ±

    • Edited by PlusOrMinus Thursday, April 19, 2012 5:46 PM Can't spell!
    Thursday, April 19, 2012 5:43 PM
  • I have turned the firewall completely off, no joy.  I have no problem anymore connecting to servers using Named Pipes even with no kerberos (no spn set).  Just that when I try to connect to a hosted db at arvixe and discountasp.net I get this same error.


    Thursday, April 19, 2012 5:57 PM
  • Derek, 

    Thanks for feedback, just to confirm that there won't be an issue if you self-host, ie intranet / control the host firewall?


    E tenebris lux. ±

    Thursday, April 19, 2012 6:06 PM
  • Yeah I don't think the firewall has anything to do with it.  I beleive it has to do with the tcp connectivity.  I also cannot connect to a hosted database through the 2012 SSMC.  This is maddening.


    Thursday, April 19, 2012 6:26 PM
  • I'm having the same problem.  SSMSC works fine but I get that error with both versions of LS when i try to connect to our server.

    I gave up and got a copy of the remote DB on my box and am happily developing again.. well, I was until I ran into the next bug..

    but at least my DB works.. all 12 gb of it..


    Thursday, April 19, 2012 10:34 PM
  • I have the same problem.

    I have not been able to find any solution for it, except uninstall .Net 4.5.


    Friday, April 20, 2012 4:27 PM
  • I am still working this problem.  I have another machine on which this is working but the debugging of extension is not.  So I am trying to compare machines.  So far no luck.  Maybe we could compare systems to see similarities to help identify the culprit.

    Windows 7 Ultimate 64 bit.

    Visual Studio Ultimate 2010 (works fine until installation of VS 11)

    SQL Server 2008 Express installed from VS 2010.

    SQL Server 2008 R2 Developer installed by me.


    Monday, April 23, 2012 10:00 PM
  • Can you create a .udl file (create an empty file called "foo.udl" in notepad -- make sure its not getting saved as foo.udl.txt, and double-click on it in your desktop), Fill it out exactly the way you would from lightswitch, and then press "test connection" ?  Does the problem happen when you do this?

    The message suggests that there is a certificate exchange going on with the SQL server.  Are you aware of any certificate configuration on the SQL server side?  Can you add "Encrypt=false" to the SQL connection string and retry?

    This thread might be relevant: http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server/54524/error-occurred-during-the-pre-login-handshake-microsoft-SQL

    Monday, April 23, 2012 10:36 PM
  • Results:

    Created foo.udl.

    First attempt default settins chose OLEDB for sql as a provider when I double clicked the file.  This attempt failed with an Invalid Connection Error.

    Changed provider to Sql Native 10.  Worked fine.

    Changed provider to Sql Native 11.  Worked fine.

    Doesnot work in VS Server Manager.

    I have tried Encrypt=False.  No joy.


    Monday, April 23, 2012 11:11 PM
  • Is there any further information here?  Anything else I can give anyone.  I have rebuilt my box (3 times).  It was working as of this morning.  I ran the updates for the VS 11 beta and bang. It stopped working.   BTW VS 2008 works.  VS 2010, VS 11 not so much.  Is there something in the differences in the registry which might affect this.  Is there something that may be causing VS 2010 and VS 11 to use the wrong driver?  Just throwing things at the wall to see what might stick.  REALLY need some help here.


    Monday, April 30, 2012 9:39 PM
  • Worked perfect for me unistalling VS11

    Tuesday, May 29, 2012 4:10 PM
  • I seen the error once other day when having dns issues IIRC.
    Friday, June 01, 2012 3:20 AM
  • Yes but that was not really an option.  I am supporting both versions of LightSwitch with my extensions so I need both.


    Monday, June 04, 2012 4:28 PM