2010-04-06 22 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; 

我希望這可以幫助別人誰遇到同樣的問題 - 它一直在竊聽我所以長!

相關問題