I am new to ASP. NET and SQL Server 2005. I am not familiar with many things.
When mediasharelibrary demo is used for the first time, the SQL server cannot connect and the SQL network error 26 is reported.
Specifically:
Provider:SQL
Network
Interfaces,Error
:26
-Error
Locating
Server/instance specified
In fact, it seems that the SQL Server location is not specified correctly. I found a lot of Methods online and tried various connectionstrings, which didn't help.
Transfer:
When I accidentally read msdn, I found this article: Configure ASP. NET 2.0 application services to use SQL Server 2000 or SQL Server 2005
. SQL Server Express.
I deleted my SQL Server express by mistake. Mediasharelibrary needs to use some membership-related databases.
Solution:
1. Configure ASP. NET 2.0 application service to use SQL Server 2000 or SQL Server 2005
To create a new database and configure it to be used by membership. The result is that many tables starting with ASPnet _ are added to the database.
2. Modify the connection string.
Add
<Remove name = "localsqlserver"/>
<Add name = "localsqlserver" connectionstring = "Data
Source = Allen/dev2005; initial catalog = test; Integrated Security = true"
Providername = "system. Data. sqlclient"/>
To configure the ASP. NET 2.0 application service to use SQL Server 2000 or SQL Server 2005, follow these steps:
Yes. You can refer to it. I will go into details here.
Summary:
SQL Server Express is ASP. NET 2. 0 some features default databases. If they do not exist, SQL network error 26 may occur.
This is only a possibility of SQL network error 26. In fact, SQL network error 26 may be caused by many reasons. If you encounter this problem, write the solution as a blog.