成功地与服务器建立了连接,但是在预登录期间发生了错误

时间:2021-02-06 01:54:58

When I am running the web service from the visual studio in built server, I am able to run the service and access the database.

当我在build server中从visual studio运行web服务时,我能够运行服务并访问数据库。

But when I hosted the web service on iis 7.5, I am able to run the web service but I am not able to access the database. I am getting the following error.

但是当我在iis 7.5上托管web服务时,我可以运行web服务,但是我不能访问数据库。我得到了以下错误。

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

成功地与服务器建立了连接,但是在登录前握手时发生了错误。(提供程序:SSL提供程序,错误:0——证书链是由不受信任的权威颁发的)

I don't have any clue how to solve this. Kindly help me in this regard.

我不知道该如何解决这个问题。请在这方面帮助我。

3 个解决方案

#1


2  

If you use SMO then you can do the followed code:

如果您使用SMO,那么您可以执行以下代码:

SqlConnectionInfo sci = new SqlConnectionInfo();
            sci.ConnectionProtocol = NetworkProtocol.NamedPipes;
            sci.EncryptConnection = false;

// set the EncryptConnection to false when you use the sqlserver SMO, when the property is set to true a servercertificate for the SQL server instance must be set.

//在使用sqlserver SMO时将EncryptConnection设置为false,当属性设置为true时,必须为SQL server实例设置servercertificate。

#2


0  

On the IIS server, I believe the certificate may need to be installed.

在IIS服务器上,我认为可能需要安装证书。

http://social.technet.microsoft.com/Forums/forefront/en-US/12c4febb-18e7-4a77-a23e-a615b3913e67/problem-of-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-i-have-imported-the

http://social.technet.microsoft.com/Forums/forefront/en-US/12c4febb-18e7-4a77-a23e-a615b3913e67/problem-of-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-i-have-imported-the

#3


0  

This error occurred after the installation of a program which changes the Internet Protocol settings of your computer. Recently I got the same issue after the installation of Internet download manager because IDM has changed the IP settings that error comes so after uninstalling IDM from my PC and restarting the PC solve the problem. SO uninstall any application which has changed the Internet Protocol settings like Internet download manager.

此错误发生在安装了更改计算机的Internet协议设置的程序之后。最近我在安装了Internet download manager后遇到了同样的问题,因为IDM在我的PC上卸载IDM并重新启动PC后改变了出现错误的IP设置,解决了这个问题。因此,卸载任何改变了Internet协议设置(如Internet download manager)的应用程序。

#1


2  

If you use SMO then you can do the followed code:

如果您使用SMO,那么您可以执行以下代码:

SqlConnectionInfo sci = new SqlConnectionInfo();
            sci.ConnectionProtocol = NetworkProtocol.NamedPipes;
            sci.EncryptConnection = false;

// set the EncryptConnection to false when you use the sqlserver SMO, when the property is set to true a servercertificate for the SQL server instance must be set.

//在使用sqlserver SMO时将EncryptConnection设置为false,当属性设置为true时,必须为SQL server实例设置servercertificate。

#2


0  

On the IIS server, I believe the certificate may need to be installed.

在IIS服务器上,我认为可能需要安装证书。

http://social.technet.microsoft.com/Forums/forefront/en-US/12c4febb-18e7-4a77-a23e-a615b3913e67/problem-of-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-i-have-imported-the

http://social.technet.microsoft.com/Forums/forefront/en-US/12c4febb-18e7-4a77-a23e-a615b3913e67/problem-of-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-i-have-imported-the

#3


0  

This error occurred after the installation of a program which changes the Internet Protocol settings of your computer. Recently I got the same issue after the installation of Internet download manager because IDM has changed the IP settings that error comes so after uninstalling IDM from my PC and restarting the PC solve the problem. SO uninstall any application which has changed the Internet Protocol settings like Internet download manager.

此错误发生在安装了更改计算机的Internet协议设置的程序之后。最近我在安装了Internet download manager后遇到了同样的问题,因为IDM在我的PC上卸载IDM并重新启动PC后改变了出现错误的IP设置,解决了这个问题。因此,卸载任何改变了Internet协议设置(如Internet download manager)的应用程序。