2010-04-06 44 views
2

我有一个记录/页面设置 - 在IIS6工作正常,但当我的IIS7的服务器我得到下面的错误上运行网站:记录集分页工作在IIS6但不是在IIIS7

Microsoft OLE DB Provider for SQL Server error '80004005' 

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. 

/orders.asp, line 197 

代码如下所示:

Set objPagingConn = Server.CreateObject("ADODB.Connection") 

objPagingConn.Open CONN_STRING

设置objPagingRS =的Server.CreateObject( “ADODB.Recordset”) objPagingRS.PageSize = iPageSize objPagingRS.CacheSize = iPageSize objPagingRS.Open STRSQL,objPagingConn,ADOPENSTATIC,ADLOCKREADONLY,为adCmdText

iPageCount = objPagingRS.PageCount iRecordCount = objPagingRS.RecordCount

线197是objPagingConn,打开...线。 我有这样的10个网站迁移 - 是否有一个简单的修复IIS7?

非常感谢帮助! 非常感谢, 马丁

回答

0

听起来像你失去了你的sql服务器的权限,当你改变了。你的连接字符串是什么?您是否尝试使用可信连接?如果是这样,也许IIS7运行在不同的帐户下。

+0

我的当前连接字符串是(like): Provider = SQLOLEDB; Server = xxx.xxx.xxx.xxx; Initial Catalog = mydb; User ID = myuser; Password = password; – Spudhead 2010-04-06 13:48:29

0

看看这个MSDN article

You may receive this error message when the following conditions are true:

  • SQL Server 2005 or SQL Server 2000 is installed on a cluster.
  • You are connecting to a SQL Server named instance by using TCP/IP sockets.
  • IPSec policy is enabled on the client domain.
  • IPSec policy is not enabled on the server domain.

他们reccomend更新与端口号的连接字符串或命名管道名称:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=clientID;Data Source=tcp:TcpIpAddress,port

+0

干杯 - 你有一个服务器/密码的真实世界的例子?或者我应该看一下connectionstrings.com? – Spudhead 2010-04-06 13:32:19

1

很多很多的实验后,我发现了一个连接字符串工作:

Provider=SQLOLEDB.1;Server=123.123.123.123,1433;Initial Catalog=mydb;Persist Security Info=True;User ID=sqladmin;Password=password; 

我希望这可以帮助别人谁遇到同样的问题 - 它一直在窃听我所以长!

相关问题