asp.net|server|sqlserver| problem
Brothers who have used VS2005 development know that when you create a new Web site project, you are asked to choose a site location that you can use without IIS as a Web server, and a file system that runs a Web server with a VS2005.
I have a project that is developed in the "File system" mode, the database system is SQLSERVER2000, in the development, everything is normal.
But when we publish, we want to use IIS, and when the project is under IIS, the code that accesses SQLSERVER2000 cannot be executed. When you connect to a database, you are forced to access SQLSERVER2005, and you are prompted
<
An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, this failure may be caused by SQL Server not allowing remote connections under the default settings. (provider: Named pipe provider, error:40-cannot open a connection to SQL Server)
>
Switch back to the file system mode, the error disappears ....
Solution:
1.
Open IIS Properties-"virtual Directory Properties-" Select NET 2.0-"point ' edit Configuration '-" Delete all connected SQLExpress items
Of course, it's best to delete the global configuration,
Turn on IIS Properties-site Properties-Select NET 2.0-point ' edit global configuration '
-"Delete all connected SQLExpress items
2. In the application server log, we found the
Exception information:
Exception type: SqlException
Exception message: An error occurred while establishing a connection to the server. When you connect to SQL Server 2005, this failure may be caused by SQL Server not allowing remote connections under the default settings. (provider: Named pipe provider, error:40-cannot open a connection to SQL Server)
Request Information:
Request Url:http://localhost/test/default.aspx
Request Path:/test/default.aspx
User Host Address: 127.0.0.1
User:
Whether authentication has been authenticated: False
Authentication type:
Thread account name: NT authority\network SERVICE
So I judged it was a SQL Server problem.
3. In the database log, we found
The Microsoft SQL Server 2000 version you are running or Microsoft SQL Server Desktop Engine (also known as MSDE) and the Microsoft Windows Server 2003 family Enable A known security vulnerability exists. To reduce the computer's attack by some viruses, the TCP/IP and UDP network ports for Microsoft SQL Server 2000,msde or both are disabled. To enable these ports, you must from http://www.microsoft.com/sql/downloads/default.asp or http://www.microsoft.com/china/sql/downloads/ Default.asp Install a hotfix, or the latest service pack for Microsoft SQL Server 2000 or MSDE.
So I changed a server just installed the system, and downloaded the SP4 of the patch hit.
Sure enough, even try again, success ....
It seems, still need to play more patches ah ....