none
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The Local Security Authority cannot be contacted)

    Question

  • Hello Guys,

    I am getting SQL exception when trying to access my local application. Following are the details of the error. Please help!!


    Server Error in '/' Application.


    A connection was successfully established with the server, but then an
    error occurred during the pre-login handshake. (provider: SSL Provider, error: 0
    - The Local Security Authority cannot be contacted)

    Description:
    An unhandled exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the error and
    where it originated in the code.

    Exception Details:
    System.Data.SqlClient.SqlException: A connection was successfully
    established with the server, but then an error occurred during the pre-login
    handshake. (provider: SSL Provider, error: 0 - The Local Security Authority
    cannot be contacted)

    Source Error:
    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.

    Stack Trace:
    [SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The Local Security Authority cannot be contacted)]
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +428
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
       System.Data.SqlClient.SqlConnection.Open() +122
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Data.SqlClient.SqlConnection.Open() +122
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       MasterPage.Page_Init(Object sender, EventArgs e) +109
       System.Web.UI.Control.OnInit(EventArgs e) +99
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.UI.UserControl.OnInit(EventArgs e) +77
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnInit(EventArgs e) +99
       System.Web.UI.Control.InitRecursive(Control namingContainer) +333
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
       System.Web.UI.Control.InitRecursive(Control namingContainer) +333
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
       System.Data.SqlClient.SqlConnection.Open() +122
       MasterPage.Page_Init(Object sender, EventArgs e) +109
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnInit(EventArgs e) +99
       System.Web.UI.UserControl.OnInit(EventArgs e) +77
       System.Web.UI.Control.InitRecursive(Control namingContainer) +333
       System.Web.UI.Control.InitRecursive(Control namingContainer) +210
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
    
    Thursday, November 08, 2012 7:13 PM

Answers

  • I hope below might solve your problem but its better you give us connection string.

    On the machine that runs the SQL Server instance, opne up the SQL Server Configuration Manager, right-click SQL Native Client Configuration, and set Force Protocol Encryption to No. Then try again.


    Regards,
    Vishal Patel
    My Blog

    Friday, November 09, 2012 4:26 PM

All replies

  • Hello,

    How does your connection string look like? Are you tring to use an encrypted connection? Is the SQL Server setup to force encrpted connections?


    Olaf Helper

    Blog Xing

    Friday, November 09, 2012 6:15 AM
  • Hello Olaf,

    No I am not using encrypted connection neither the SQL server is set to force encryption.

    Thanks,

    Friday, November 09, 2012 2:17 PM
  • I hope below might solve your problem but its better you give us connection string.

    On the machine that runs the SQL Server instance, opne up the SQL Server Configuration Manager, right-click SQL Native Client Configuration, and set Force Protocol Encryption to No. Then try again.


    Regards,
    Vishal Patel
    My Blog

    Friday, November 09, 2012 4:26 PM