开发者

Error with SQLXMLCommand and Deployment to IIS 6.0

I am getting an error when trying to move my ASP.NET application from VS2010 to our IIS 6.0 webserver. The error happens on the first time the app tries to make a new SQLXMLCommand Object on the login page.

When navigating to the login page and entering valid credentials I got an error saying a null reference exception was thrown. Investigating into the exception we were able to determine another exception was being thrown and caught, causing the null reference exception later in the code.

The Corresponding line of code throwing the exception:

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

The exception causing the problems below:

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)开发者_StackOverflow中文版 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)"

Looking further into the problem, the exception is only thrown on the Web Server. No exception is thrown if I am using localhost. I though I may be missing a reference to Microsoft.Data.SqlXml.dll as it was working localhost and not on the webserver. I tried fixing this by included the dll reference in my deployment project and making sure it was added to the bin folder, but with no avail.

Thanks, for the help.

Edit:

SQLXML 4.0 was not installed on our webserver, it was part of the baseline installation of my machine.


In addition to the managed SQLXML assembly, you need to install the native SQLXML library on the server.

The SQLXML libraries are documented at http://msdn.microsoft.com/en-us/library/ms171779.aspx, and you can find the installer at https://www.microsoft.com/en-us/download/details.aspx?id=30403

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜