紧急求助asp.net2.0程序连接sqlserver2000数据库出现问题
服务器配置:
windows2003
framework2.0
framework1.1
sqlserver2000出现如下错误:(查看错误网址:http://union.tesu.cn)
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 connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
服务器配置:
windows2003
framework2.0
framework1.1
sqlserver2000出现如下错误:(查看错误网址:http://union.tesu.cn)
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 connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
用connectionstring, <connectionStrings>
<add name="strCon" connectionString="server=servername;database=rfdatabase;uid=sa;pwd=123"
/>
</connectionStrings>读取时代码:string strconn = System.Configuration.ConfigurationManager.ConnectionStrings["strCon"].ConnectionString;
找到web.config标签<connectionStrings>替换成上面的,然后修改你的数据库链接代码