求救asp.net 2.0连接sql server 2000的问题

deltazxm 2006-12-23 11:10:28
今天遇到一件奇怪的事,我在一个买的空间(数据库为sql server 2000)上了一个asp.net 2.0的网站。运行了几天没问题。今天出现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) 这样的问题。。。更奇怪的是。我把同样的文件放到我的电脑。数据库远程连接空间上的数据库服务器不会有问题。只有空间上的文件才会出现这种问题。(注:联的是sql server 2000的数据库服务器)希望高手能帮忙解决啊....急!!!!!!!
...全文
135 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
deltazxm 2006-12-24
  • 打赏
  • 举报
回复
现在又出现了新的问题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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
请问这是什么问题?
deltazxm 2006-12-24
  • 打赏
  • 举报
回复
服务器上是2000的数据库,跟SQLEXPRESS有关系吗?
zhudao92 2006-12-24
  • 打赏
  • 举报
回复
我以前遇到过这种问题
我的改进
SqlConnection conn = new SqlConnection(@"Data Source=DAISYLH\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True;Pooling=False");


加一个@
deltazxm 2006-12-24
  • 打赏
  • 举报
回复
急用啊。有人能帮忙解决吗?万分感谢!
deltazxm 2006-12-24
  • 打赏
  • 举报
回复
我晕死。终于搞定了。。。就是把Data Source=locahhost就行了。
Edisoncat 2006-12-23
  • 打赏
  • 举报
回复
默认连接有时候也会出问题的

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧