Home > Net >  Turn the database link failure!
Turn the database link failure!

Time:09-18

System. The Data. SqlClient. SqlException: "in establishing connection with SQL Server and network or specific instances of the error, or unable to access the Server was not found, please verify the instance name is correct and that SQL Server is configured to allow remote connections, (the provider: Named Pipes provider, error: 40 - unable to open the connection to SQL Server)"
Vs2019 version
Sql2014 version
My program can be run out on other people's computer, run on your computer so this mistake! Help me bai! Save the children!

CodePudding user response:

Open the SQL management tool can you log in? If you can login message posted your connection string

CodePudding user response:

SQL environment, others can not, you have no, can determine the local database on even?

CodePudding user response:

Look at the web. Config files in the database configuration database may be even more is not the same

CodePudding user response:

That there is something wrong with the connection string to connect your database server, copy the code directly to the other environment, remember to modify the connection string

CodePudding user response:

Double database, or code inside the reference library, or web. Config the configuration string conflict,

CodePudding user response:

I can log on to the database!
DBHelper was written by my own!

Estimation problem is vs and essentially no link

CodePudding user response:

SQL environment I don't know how to install! How to view the environment installed without!
This is my web. Config file
<? The XML version="1.0" encoding="utf-8"?>

Detailed information on how to configure the ASP.NET application, please visit
https://go.microsoft.com/fwlink/? LinkId=169433
- & gt;





Type="Microsoft. CodeDom. Will. DotNetCompilerPlatform. CSharpCodeProvider, Microsoft, CodeDom. Will the DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35"
WarningLevel="4" compilerOptions="/langversion: default/nowarn: 1659; 1699; 1701 "/& gt;
Type="Microsoft. CodeDom. Will. DotNetCompilerPlatform. VBCodeProvider, Microsoft, CodeDom. Will the DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35"
WarningLevel="4" compilerOptions="/langversion: default/nowarn: 41008/define: _MYTYPE=\ & amp; quot; The Web \ & amp; quot;/optionInfer + "/& gt;



CodePudding user response:

reference 7 floor blue - sea response:
I don't know how to install the SQL environment! How to view the environment installed without!
This is my web. Config file
<? The XML version="1.0" encoding="utf-8"?>

Detailed information on how to configure the ASP.NET application, please visit
https://go.microsoft.com/fwlink/? LinkId=169433
- & gt;





Type="Microsoft. CodeDom. Will. DotNetCompilerPlatform. CSharpCodeProvider, Microsoft, CodeDom. Will the DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35"
WarningLevel="4" compilerOptions="/langversion: default/nowarn: 1659; 1699; 1701 "/& gt;
Type="Microsoft. CodeDom. Will. DotNetCompilerPlatform. VBCodeProvider, Microsoft, CodeDom. Will the DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35"
WarningLevel="4" compilerOptions="/langversion: default/nowarn: 41008/define: _MYTYPE=\ & amp; quot; The Web \ & amp; quot;/optionInfer + "/& gt;




What do you have connection string, string to connect to the database

CodePudding user response:

Database link I wrote in the DBHelper is in the picture above

CodePudding user response:

Once I have the error, at the start of the search SQL configuration manager interface, the disabled, inside, to enable manual to automatic, solve as I am not sure you can

CodePudding user response:

CodePudding user response:

Try the vs the data on the menu - add data sources,

CodePudding user response:

Should be the database setup issue TCP/IP is not enabled

CodePudding user response:


Don't start

CodePudding user response:


TCP/IP is enabled

CodePudding user response:

This is a look at the version problem

CodePudding user response:

To: # 14
nullnullnull
  • Related