当前位置: 代码迷 >> ASP.NET >> Asp.net 2.0 +sql server 2000 部署有关问题
  详细解决方案

Asp.net 2.0 +sql server 2000 部署有关问题

热度:2229   发布时间:2013-02-26 00:00:00.0
Asp.net 2.0 +sql server 2000 部署问题

        Exception   type:   SqlException  
        Exception   message:   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:   TCP   Provider,   error:   0   -   由于套接字没有连接并且(当使用一个   sendto   调用发送数据报套接字时)没有提供地址,发送或接收数据的请求没有被接受。)  
 
为什么老是出现这个问题?

------解决方案--------------------------------------------------------
连接数据库的符串,是不是没有指定?

conn.connectionstring=
------解决方案--------------------------------------------------------
你的字符串是不是链接出错了
------解决方案--------------------------------------------------------
看看是不是防火墙的问题
------解决方案--------------------------------------------------------
你应该把连接数据库的字符串贴出来我们看看撒
------解决方案--------------------------------------------------------
同意楼上几位的观点,很可能是连接字符串的错误,楼主你检查一下
------解决方案--------------------------------------------------------
是你没有把数据库服务器开开...
------解决方案--------------------------------------------------------
under the default settings SQL Server does not allow remote connections. (provider: TCP Provider,
给的意思是说如果用sql2005默认情况下sqlserver不允许用tcpip连接
现在你用的2000 先用odbc什么的试试再说,看看你的连接方式到底可行否
  相关解决方案