错误消息如下:
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)这个错误在本机上调试的时候没有问题,因为本机安装了VS TEAM SUIT 版本,自带了SQLSERVER2005EXPRESS,不过我搞不明白的是我使用的是ms-sqlserver2000,关SQL Server 2005什么事啊?
数据库连接字符串如下: <add name="Default" providerName="System.Data.SqlClient" connectionString="Data Source=(local);Integrated Security=false; Initial Catalog=test;uid=sa;pwd=test"/>另外does not allow remote connections.也不大明白,因为服务器的管理员在使用该WEB程序访问数据库的时候也是同样的错误最后鄙视一下CSDN的发贴机制,刚才输错了分数,结果提交后敲的文字因为错误全部丢失了(幸亏我早知道,提交前把内容复制了),强烈鄙视
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)这个错误在本机上调试的时候没有问题,因为本机安装了VS TEAM SUIT 版本,自带了SQLSERVER2005EXPRESS,不过我搞不明白的是我使用的是ms-sqlserver2000,关SQL Server 2005什么事啊?
数据库连接字符串如下: <add name="Default" providerName="System.Data.SqlClient" connectionString="Data Source=(local);Integrated Security=false; Initial Catalog=test;uid=sa;pwd=test"/>另外does not allow remote connections.也不大明白,因为服务器的管理员在使用该WEB程序访问数据库的时候也是同样的错误最后鄙视一下CSDN的发贴机制,刚才输错了分数,结果提交后敲的文字因为错误全部丢失了(幸亏我早知道,提交前把内容复制了),强烈鄙视
儿 sql 2005 就是aaa/SQLEXPRESS可能默认到了2005上面了。。不要用(local) 试试。。
不过问题并没有解决首先,服务器上只安装了Sqlserver2000
其次,服务器上还有其他基于1.1开发的WEB程序,他们使用同样的字符串可以正常访问数据库
服务器操作系统:windows2003
上MSN做什么?
http://community.csdn.net/Expert/topic/4708/4708899.xml?temp=.9085962
及http://community.csdn.net//Expert/TopicView2.asp?id=4537158&datebasetype=now 中我的回复====
~~~~ 我的Blog:http://blog.csdn.net/quou2002
<connectionStrings>
<add name="Default" connectionString="Data Source=(local);Integrated Security=false;Initial Catalog=HubuVod;uid=sa;pwd=test" providerName="System.Data.SqlClient" />
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=(local);Integrated Security=false;Initial Catalog=HubuVod;uid=sa;pwd=test" providerName="System.Data.SqlClient"/>
</connectionStrings>这个是最终使用的连接字符串,我只做了这个更改,没有进行其他配置就OK了多谢大家,THANKS