The problems that need attention when asp.net2.0 connect SqlServer200

Source: Internet
Author: User
Tags file system iis log microsoft sql server connect
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 ....




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.