最近準(zhǔn)備用asp.net 2.0寫一系統(tǒng),數(shù)據(jù)庫用SQL Server 2000,開發(fā)環(huán)境用VS 2005。運(yùn)行系統(tǒng)的時(shí)候報(bào)下面的錯(cuò)誤: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote onnections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
開始一直想不明白,我明明用的是SQL Server 2000,為什么報(bào)的錯(cuò)是connecting to SQL Server 2005。后來才想起是由于安裝VS 2005時(shí)將SQL Server 2005的相關(guān)東西安裝上了,以至于SQL Server 處理連接請求時(shí)用的是SQL Server 2005服務(wù)處理的。SQL Server 2005的默認(rèn)配置是不允許遠(yuǎn)程連接的。因此會報(bào)上面的錯(cuò)誤。關(guān)于SQL Server 2005遠(yuǎn)程連接的配置在SQL Server 2005 Configueration管理程序里有相關(guān)的設(shè)置。
|