jamie77777
asked on
DLL works localhost, but not IIS7
I have an ASPX page that references a DLL. I've registered the DLL on the webserver and linked reference within Visual Studio 2010.
When hitting the 'play' button in VS2010 the page (and DLL) works perfectly. If I load the website in IIS7 I get the error below. What am I missing?
--------------
Server Error in '/' Application.
Retrieving the COM class factory for component with CLSID {53F79BB4-1B8A-4280-A853-E 9455C725B1 A} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServ ices.COMEx ception: Retrieving the COM class factory for component with CLSID {53F79BB4-1B8A-4280-A853-E 9455C725B1 A} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Source Error:
Line 6: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Line 7:
Line 8: Dim px As New PXACCESSLib.PxAccessCtrl
When hitting the 'play' button in VS2010 the page (and DLL) works perfectly. If I load the website in IIS7 I get the error below. What am I missing?
--------------
Server Error in '/' Application.
Retrieving the COM class factory for component with CLSID {53F79BB4-1B8A-4280-A853-E
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServ
Source Error:
Line 6: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Line 7:
Line 8: Dim px As New PXACCESSLib.PxAccessCtrl
just an update, I converted the project from .Net 2 to .Net 4 and rebuilt the dll that controls / executes the MySQL connection strings and my problem was resolved. It might not be the same problem you experienced but the problems experienced looks similar.
HTH
HTH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fixed it after more net searching...
I'm busy with almost the same problem at this point in time. What I have found is that it works perfectly on the local host (Windows 7 32bit) but I have to rebuild the project because the dll does not behave in the expected manner when published to the server (08 R2). I believe the dll does not work correctly when going over to 64bit. My problem has a "MySQL" related problem but yours might be in the same direction.
HTH