Link to home
Start Free TrialLog in
Avatar of mtanquary
mtanquaryFlag for United States of America

asked on

Application breaks when running in IIS on Windows 2003. (80040154 error)

I have a ASP.NET application that is built and runs fine on WindowsXP. The application uses a 3rd party library (ocx) to do its processing.

When we install the web site onto a Windows 2003 Server (64-bit or 32-bit), we get the following error:

Retrieving the COM class factory for component with CLSID {A7B8D183-B392-4492-8CDA-4D77593C5542} failed due to the following error: 80040154

The CLSID refers to the aforementioned 3rd party library.

I have a stand-alone executable that uses the library which works fine on the Windows2003 server. The error comes when used both in a Web App and Windows Service.

We installed and tested on a 32-bit server to rule out issues with 32 vs 64 bit architecture. It seems to be a security issue. However, we have opened up both the registry entries and file system objects to 'Everyone' and still receive the error.

We also have registered and re-registered the 3rd party OCX file.

We have exhausted all solutions we have seen out there and hope that you may be able to provide new suggestions.
Avatar of gjutras
gjutras

check your administrative tools, component services and open the permissions on the com object.  COM security is probably what's blocking you.  Assuming this is a non active directory server, I'd set the ntfs file security permissions to give IIS_WPG group permissions to do what you need, and take away the all on everyone permissions.
Avatar of mtanquary

ASKER

I tried to do that, but I can't find the Component listed under DCOM config. Is there another place to look or a way to add the object to the list?
go to the registry and hkey_classes_root\clsid\A7B8D183-B392-4492-8CDA-4D77593C5542
and find the application guid that it points to
and then
change the view in the dcom section to details and try looking through the guid's to see if you can find it by guid referenced in the registry.  Maybe it's named a little different.
I found the key in HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{A7B8D183-B392-4492-8CDA-4D77593C5542}...noting the added Wow6432Node .

I can not find the GUID in the AppID list in detail view.
Sorry, I'm out of ideas if there wasn't an id in the clsid branch.
Thank you for looking into it for me. :-)
You may want to try opening your IIS and reviewing the security entries related to the Application Pools associated with the website you are running. You might have to move the website into it's own website and application pool in order to change the security on the server to one that has access to the COM object. I would think that the web application is just running under IUSR or some such guest web account (no rights).

Alternatively in the web.config you could try using impersonation to execute the com object.
http://msdn2.microsoft.com/en-us/library/xh507fc5.aspx

You may also want to check out the dcom configuration settings using the method below.
http://support.sas.com/rnd/itech/doc9/admin_oma/sasserver/comdcom/xpsp2.html#dcomsrv
ASKER CERTIFIED SOLUTION
Avatar of mtanquary
mtanquary
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial