我正在從Windows 2000(32位)服務器遷移到Windows 2008 R2(64位)的大型代碼庫(主要是vbscript)。這段代碼的很大一部分依賴於MSXML 4.0解析器,不幸的是,我們沒有選擇使用版本3或6(因爲這個問題的範圍之外的原因)。Windows Server 2008r2上的MSXML4.0 - 無法創建對象MSXML2.ServerXMLHTTP.4.0
我已按照http://www.microsoft.com/en-us/download/details.aspx?id=15697的說明安裝了MSXML的4.0版本,並驗證它是否正確安裝。 「c:\ windows \ syswow64」中存在「msxml4.dll」,並且在HKEY_CLASSES_ROOT \ Msxml2.ServerXMLHTTP.4.0的註冊表中有一個鍵。我甚至運行regsrv32.exe對dll,它說它已正確註冊。
然而,試圖做
Set objAsp = CreateObject("MSXML2.ServerXMLHTTP.4.0")
它失敗時:
Script: C:\test.vbs
Line: 1
Char: 1
Error: ActiveX component can't create object: 'MSXML2.ServerXMLHTTP.4.0'
Code: 800A01AD
Source: Microsoft VBScript runtime error
而且在PowerShell中:
$objAsp = New-Object -ComObject MSXML2.ServerXMLHTTP.4.0
它失敗:
New-Object : Retrieving the COM class factory for component with CLSID {88D969C6-
F192-11D4-A65F-0040963251E5} failed due to the following error: 80040154 Class not
registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
At line:1 char:11
+ $objAsp = New-Object -ComObject MSXML2.ServerXMLHTTP.4.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
+ FullyQualifiedErrorId :
NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
提前致謝。
你嘗試在註冊表中'MSXML2.ServerXMLHTTP.4.0'搜索?如果您可以使用其CLS ID創建[https://msdn.microsoft.com/en-us/library/windows/desktop/ms691424%28v=vs.85%29.aspx]。只是例如:http://sanirimbuyok.blogspot.com.tr/2015/04/fiddler-ile-sql-serverdan-yaplan-web.html – uzay95 2015-04-17 08:12:12