2011-06-15 110 views
0

我試圖將我的ASP.NET應用程序從VS2010移動到我們的IIS 6.0 Web服務器時出現錯誤。該錯誤發生在應用程序第一次嘗試在登錄頁面上創建新的SQLXMLCommand對象時發生。SQLXMLCommand和部署到IIS 6.0時出錯

當導航到登錄頁面並輸入有效的憑據時,我收到一個錯誤,指出引發了空引用異常。調查異常,我們能夠確定另一個異常被拋出並被捕獲,導致代碼後面的空引用異常。

相應的代碼行拋出異常:

New SqlXmlCommand(conn.ConnectionString & ";Provider=SQLOLEDB.1;") 

異常導致以下問題:

Retrieving the COM class factory for component with CLSID {83D0FC3E-8B31-4B35-A1B2-346BA3954514} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))." System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {83D0FC3E-8B31-4B35-A1B2-346BA3954514} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at Microsoft.Data.SqlXml.SqlXmlCommand.fillManagedWrapper() at Microsoft.Data.SqlXml.SqlXmlCommand.construct() at Microsoft.Data.SqlXml.SqlXmlCommand..ctor(String cnString) at dialogue.login.UserLogin(String username, St 2011-Jun-15 11:40:52.104 CriticalError N/A 58 "http://sigappsdv/dialogue/login.aspx" dialogue.login.UserLogin ---> "Webservice failed 2 at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at Microsoft.Data.SqlXml.SqlXmlCommand.fillManagedWrapper() at Microsoft.Data.SqlXml.SqlXmlCommand.construct() at Microsoft.Data.SqlXml.SqlXmlCommand..ctor(String cnString) at dialogue.login.UserLogin(String username, String password, String lang)"

進一步展望問題,異常僅拋出的Web服務器上。如果我使用本地主機,則不會引發異常。我雖然我可能會缺少對Microsoft.Data.SqlXml.dll的引用,因爲它是在localhost上工作,而不是在web服務器上。我試圖通過在我的部署項目中包含dll引用來解決此問題,並確保它已添加到bin文件夾中,但無濟於事。

謝謝,尋求幫助。

編輯:

SQLXML 4.0並沒有在我們的網絡服務器安裝,這是基準安裝我的機器的一部分。

+0

安裝程序? – Lareau 2011-06-16 16:39:30

回答