473,657 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception: Retrieving the COM class factory for component with CLSID {}

Frinavale
9,735 Recognized Expert Moderator Expert
Hi guys,

I've created a VB.Net project and have compiled it, run it, tested it on a machine that has a 32bit processor. I am now trying to move this project onto a 64bit processor server that is running IIS6.

The project works wonderfully until it tries to access a DLL that is essential to the project. At that time I am getting the following error:

Exception: Retrieving the COM class factory for component with CLSID{...}

I have registered the DLL on the server.

After searching the web I've found to possible causes to the error but I don't know how to get around them.

The first possible cause is that the ASPNET user doesn't have the privialges to access this dll. I have no idea how to set the permissions for a registered dll.

The second is that the 64bit environment will not run my 32bit DLL. Is there a way around this problem?

Thanks in advance!
-Frinny
Feb 6 '07 #1
11 5379
Motoma
3,237 Recognized Expert Specialist
Hi guys,

I've created a VB.Net project and have compiled it, run it, tested it on a machine that has a 32bit processor. I am now trying to move this project onto a 64bit processor server that is running IIS6.

The project works wonderfully until it tries to access a DLL that is essential to the project. At that time I am getting the following error:

Exception: Retrieving the COM class factory for component with CLSID{...}

I have registered the DLL on the server.

After searching the web I've found to possible causes to the error but I don't know how to get around them.

The first possible cause is that the ASPNET user doesn't have the privialges to access this dll. I have no idea how to set the permissions for a registered dll.

The second is that the 64bit environment will not run my 32bit DLL. Is there a way around this problem?

Thanks in advance!
-Frinny

I ran into a similar problem once, and the error was solved by simply including the DLL in the references.

In the (very) unlikely case that the 64bit environment cannot load the 32bit DLL, Visual Studio has an option to specify the target architecture. I have never run into a circumstance where this is needed, however.

Is this a COM DLL or a .NET DLL? You may need to open up the Component Services and adjust permissions and execution security there.

Sorry, I'm not connected to our network right now, so I can't give more elaborate instructions, hopefully someone else catches where I am going and can provide the exact names, paths, and tabs you need to click :P
Feb 6 '07 #2
Frinavale
9,735 Recognized Expert Moderator Expert
I ran into a similar problem once, and the error was solved by simply including the DLL in the references.

In the (very) unlikely case that the 64bit environment cannot load the 32bit DLL, Visual Studio has an option to specify the target architecture. I have never run into a circumstance where this is needed, however.

Is this a COM DLL or a .NET DLL? You may need to open up the Component Services and adjust permissions and execution security there.

Sorry, I'm not connected to our network right now, so I can't give more elaborate instructions, hopefully someone else catches where I am going and can provide the exact names, paths, and tabs you need to click :P
By including the DLL in the references, do you mean in the project itself?
The reference has already been included in the project and the project has been compiled on the 32bit machine with this DLL referenced.

It is a COM DLL. I'm not sure what a Component Service. I'll try looking this up.

Thanks for your help!

-Frinny
Feb 7 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
By including the DLL in the references, do you mean in the project itself?
The reference has already been included in the project and the project has been compiled on the 32bit machine with this DLL referenced.

It is a COM DLL. I'm not sure what a Component Service. I'll try looking this up.

Thanks for your help!

-Frinny

Ok I'm an idiot sometimes. I don't know why I said I didn't know what a Component Service was...I guess I was just having one of those brain blocks...its that utility in Windows that I've only used a couple of times in my life so far.

I tried to use the Component Service to set the permissions on my DLL yesterday but my DLL isn't listed there. Do you know how to make it show up?

I've looked for it in both the COM+ Applications, and the DCOM Config...could it possibly be somewhere else?

I also tried going directly into the registration and setting the permissions directly on the DLL. This didn't help.

Sorry for the temporary idiocy (at least I hope it was temporary hehe)

-Frinny
Feb 7 '07 #4
Motoma
3,237 Recognized Expert Specialist
Ok I'm an idiot sometimes. I don't know why I said I didn't know what a Component Service was...I guess I was just having one of those brain blocks...its that utility in Windows that I've only used a couple of times in my life so far.

I tried to use the Component Service to set the permissions on my DLL yesterday but my DLL isn't listed there. Do you know how to make it show up?

I've looked for it in both the COM+ Applications, and the DCOM Config...could it possibly be somewhere else?

I also tried going directly into the registration and setting the permissions directly on the DLL. This didn't help.

Sorry for the temporary idiocy (at least I hope it was temporary hehe)

-Frinny
The way I usually do it, is open Component Servies > My Computer > COM+ Applications, then right click on COM+ Applications and go New > Applicaiton.
Do an Empty application, type a name, set the options, and hit finish.
Select the application under the COM+ Applications from the left pane, and then select Components. Then drag and drop the DLL there. Now you will be able to fool with the properties of your DLL.
I'm sure there are other (better) ways of doing it, but I don't know of those ways.
Feb 7 '07 #5
Frinavale
9,735 Recognized Expert Moderator Expert
Hi there!

I still haven't solved this problem yet but at least now I have a good idea of what is wrong.

I guess I should have mentioned in my first post that the project is a .NET web application that uses a COM DLL as a reference to do some important processing.

Anyways, using Depends.exe (that comes with Visual Studio) I was able to determine that the DLL has some components missing but also (more importantly) that it has been compiled for a 32bit OS.

Since the OS I'm moving the application to is 64bit there are conflicts. I think that if I am able to compile the web-application targeting a 64bit platform I'll be able to solve my problem (hopefully!).

All of my attempts at registering the DLL in the SysWOW64 were in vein because when I deploy the web application from my 32bit machine it moves the whole assembly over and uses its own personal DLLs located in its "bin" folder. It never even looks to see what is installed on the server.

My question now is, how do I compile the web-application targeting the 64bit platform?

I've been trying to find the answer online but every time I think I've found help they step me through menus that don't exist.

Does anyone know how to do this?

Thanks a lot for your help

-Frinny
Feb 9 '07 #6
Motoma
3,237 Recognized Expert Specialist
Hi there!

I still haven't solved this problem yet but at least now I have a good idea of what is wrong.

I guess I should have mentioned in my first post that the project is a .NET web application that uses a COM DLL as a reference to do some important processing.

Anyways, using Depends.exe (that comes with Visual Studio) I was able to determine that the DLL has some components missing but also (more importantly) that it has been compiled for a 32bit OS.

Since the OS I'm moving the application to is 64bit there are conflicts. I think that if I am able to compile the web-application targeting a 64bit platform I'll be able to solve my problem (hopefully!).

All of my attempts at registering the DLL in the SysWOW64 were in vein because when I deploy the web application from my 32bit machine it moves the whole assembly over and uses its own personal DLLs located in its "bin" folder. It never even looks to see what is installed on the server.

My question now is, how do I compile the web-application targeting the 64bit platform?

I've been trying to find the answer online but every time I think I've found help they step me through menus that don't exist.

Does anyone know how to do this?

Thanks a lot for your help

-Frinny
Doing this in VB.NET, there are no "target architectures;" everything is build for the .NET framework. If you are certain that the issue is being unable to load the 32 bit DLL, then you will need to recompile the DLL.
What 64 bit architecture is the machines you are having problems with? I know that the x64 supports the x86 instruction set, and have never had an issue with this on my machine. Windows x64 systems are usually able to run all 32 bit applications using the WOW64 subsystem.
I have no idea what support IA64 has for 32 bit systems, but I would assume there is a similar way of handling things there.
Feb 9 '07 #7
Frinavale
9,735 Recognized Expert Moderator Expert
Doing this in VB.NET, there are no "target architectures;" everything is build for the .NET framework. If you are certain that the issue is being unable to load the 32 bit DLL, then you will need to recompile the DLL.
What 64 bit architecture is the machines you are having problems with? I know that the x64 supports the x86 instruction set, and have never had an issue with this on my machine. Windows x64 systems are usually able to run all 32 bit applications using the WOW64 subsystem.
I have no idea what support IA64 has for 32 bit systems, but I would assume there is a similar way of handling things there.
The server is running Windows Server 2003 Standard x64 Edition with IIS6.
Do I have to put my project into a special folder for it to run using the WOW64 subsystem? I can't really move it off of the IIS....

When I registered the DLL I had to place it into the SysWOW64 in order to do so, but l application is ignoring the registered DLL.

When I load the DLL the web-application is using in the Depends.exe I get the following errors:
" Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has unresolved import due to a missing export function in a delay-load dependent module."

The missing DLL is: DWMAPI.DLL

The COM object that's causing all the problems has been developed using VB6 and I'm not sure that it will be able to be recompiled targeting a 64bit platform.

Thanks so much for your help.
-Frinny
Feb 9 '07 #8
Motoma
3,237 Recognized Expert Specialist
The server is running Windows Server 2003 Standard x64 Edition with IIS6.
Do I have to put my project into a special folder for it to run using the WOW64 subsystem? I can't really move it off of the IIS....

When I registered the DLL I had to place it into the SysWOW64 in order to do so, but l application is ignoring the registered DLL.

When I load the DLL the web-application is using in the Depends.exe I get the following errors:
" Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has unresolved import due to a missing export function in a delay-load dependent module."

The missing DLL is: DWMAPI.DLL

The COM object that's causing all the problems has been developed using VB6 and I'm not sure that it will be able to be recompiled targeting a 64bit platform.

Thanks so much for your help.
-Frinny
I had not used Depends.exe until just now, however, when I launched it with three DLLs located in it's own directory, I recieved the same messages on two of them:
DWMAPI.DLL: Error Opening File. The system cannot find the file specified (2).
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has unresolved import due to a missing export function in a delay-load dependent module."
This leads me to believe that this is not the source of your problem.

What you could do is create a small test program to load up your DLL and call one of it's functions. In C# you would do this like so:

Expand|Select|Wrap|Line Numbers
  1. Using System.Runtime.InteropServices;
  2.  
  3.  
  4. public class myclass
  5. {
  6.     [DllImport("crapapp.dll")] 
  7.     public static extern int intReturningFunctionFromDLL(int arg1, string arg2);
  8.  
  9.     static void main()
  10.     {
  11.         if(intReturningFunctionFromDLL(5, "toasty")) Console.WriteLine("Success");
  12.         else Console.WriteLine("Success as well!");
  13.     }
  14. }
  15.  
  16.  
P.S. My code is guarenteed not to work, it is just meant to be an example/a guide/some crap pseudo code.
Feb 9 '07 #9
Frinavale
9,735 Recognized Expert Moderator Expert
I had not used Depends.exe until just now, however, when I launched it with three DLLs located in it's own directory, I recieved the same messages on two of them:

This leads me to believe that this is not the source of your problem.

What you could do is create a small test program to load up your DLL and call one of it's functions. In C# you would do this like so:
...

P.S. My code is guarenteed not to work, it is just meant to be an example/a guide/some crap pseudo code.
I created a test windows application which uses the DLL that has been registered on the computer (in the SysWOW64 folder).

It runs fine.

The web-application still does not work despite the fact that I have changed IIS to run 32-bit applications on the 64-bit server.

I found out how to do this at this site. This site mentions that if the 32-bit problems still persist to check to see if the application needs to reference the %windir%\syswow 64\inetsrv to resolve the problem.

I'm sure that I need to do this step because the DLL is working fine in the test windows application.... and the web-application's version is not working.

Does anyone know how to change the application so that it references this directory?

Thanks a lot

-Frinny
Feb 9 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3666
by: mihironline | last post by:
We have a scheduled job, which runs at every 5 min. As first step of this job, we are executing a stored proc. Inside stored proc, we have following line of code insert #exeResult EXEC master..xp_cmdshell @cmd -- where @cmd is an exe
3
16253
by: Harish | last post by:
I am buiding an application in ASP.Net 2.0 with C#. After installing corel wordperfect i am adding the reference into the application. Afetr adding reference interop.wordperfect.dll is added to the Bin folder. After creating the object of Wordperfect.Perfectscript i am opening the wordperfect file and then run the wordperfect macro. In development version the application is running without any error. If i publish the website on local...
0
1956
by: orieni | last post by:
Hi, I have writen a code to take snapshot of Internet Explorer. The code works fine when run in the debug mode. But once I publish the site I get the following error for: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error:
0
2641
by: Olman Quesada | last post by:
Hi everybody, I'm trying to access a TLB in a VB.Net 2005 project. The TLB file is located under c:\windows\system32 directory. However, when a try to instanciate a variable whose type is declared in such TLB I got the following exception:
1
7896
Frinavale
by: Frinavale | last post by:
Hi there :) I've finally moved my Online Registration project on to the box where it will be hosted. This new server is running IIS6. After moving the project to the new server and running through it to make sure every thing's working I ran into the following error: Exception: Retrieving the COM class factory for component with CLSID {63EA957E-1FFE-41D5-940E-AF431279FB19} failed due to the following error: 80040154.
3
14500
by: =?Utf-8?B?Tmljaw==?= | last post by:
Hi all, i have a web application and one of the function is to generate a word document by button click. it works fine in debug mode when i run this web application. But after i deploy to my local IIS server, it always show this error when i click the button which trying to generate a word document. Error msg:
9
46749
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
4
5463
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
0
2959
by: Shailesh Patel | last post by:
Hi, I get the following error. Retrieving the COM class factory for component with CLSID {F84433FF-2369-4427-B6FB-3CBA67EDA7EB} failed due to the following error: 80040154 ASP.NET(VB.NET) website was working fine with COM components. But when I updated COM and referanced it again, I got error on website.
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.