2011-06-15 111 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

回答