473,395 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Problem with interop .NET dlls in distributed client applications

SPanicker
Hi,

I have a .NET DLL (exposed for COM interop) migrated from a server into many client machines. This DLL is causing an Automation error 0x80070002 ("The system cannot find the file specified. ").

The invoking VB dll is in the same folder as the .NET dll and is having a proper .tlb refernce made which is visible in Intellisense.

I am quite confused why this error should popup as everything is fine with both the components. Even re-registering the component with regasm didn't help.

But the interesting thing is that, it started working when I locally compiled the .NET component(using .NET 2005).

Why does this happen? I cannot make out anything as both the binaries I have (the migrated ones and the locally compiled ones) are identical.

Can anyone please provide an insight ?


Regards,
SP.
Feb 25 '09 #1
9 2357
Can somebody share thoughts on this?
Feb 26 '09 #2
This problem still persists. Any knowledge sharing on this?
Feb 28 '09 #3
vekipeki
229 Expert 100+
After using regasm, you should register your assembly in GAC (using gactool). Note that, once your assembly is in GAC, changes to your local assembly copy will not reflect in GAC, so be careful to register it in GAC every time you're updating your dlls.

If you don't want to use GAC, just use the /codebase option with regasm, that way you can specify a custom folder for your assembly.

Read this article for more info: http://msdn.microsoft.com/en-us/libr...w6(VS.71).aspx
Mar 2 '09 #4
Thanx for the post.
The problem is with the dll migrated from a build machine and not with registering/GAC-ing. It seems the dll built and copied from the build machine due to some reason cannot be recognized in the client machine. I tried re-registering the comp. from the build machine in the client using /codebase switch but it doesn't workout.
Mar 2 '09 #5
vekipeki
229 Expert 100+
But didn't you say they were identical (I presume you diff-ed them to make sure)? If they are binary identical, then it's impossible to replace one binary file with another (exactly the same), and have different results, it just doesn't make sense. Except if there's something different with their Read&Execute permissions or something like that?

Are you sure that compiling the assembly locally didn't register it in GAC? You compiled it and then replaced the old assembly with the new one?
Mar 2 '09 #6
No actually I am not trying to put it in GAC and I don't have given a strong name either for the .dll.
Yes the binaries are identical (the one built in build machine and copied to client and the one locally compiled) - that is what is driving me crazy.

Is there any tool (from MS) to check for the similarity of .NET binaries created?

Also one more aspect to note is that, the class has a progid set but I am not using it anywhere - can this be removed?
And also the constructor of my .NET class instantiates classes which creates instances of unmanaged code / COM components.

Any thoughts?
Mar 2 '09 #7
vekipeki
229 Expert 100+
Is there any tool (from MS) to check for the similarity of .NET binaries created?
If they are identical, they are identical, regardless of the tool used. How did you find out they are identical in the first place?

You can use any diff tool you like (File comparison tools).

Also one more aspect to note is that, the class has a progid set but I am not using it anywhere - can this be removed?
You don't need to remove the progid. Try to open regedit and search for your COM GUID. You should be able to find a node named InprocServer32, which will contain the path to the used assembly (CodeBase) - since you are not using GAC, you have to use the /codebase switch. Check if that path is correct.
Mar 2 '09 #8
Sory the DLLs are binarily diff. but the tlbs are identical. I used Winmerge to check this.

Yes it has the proper path set in 'InProcServer/Codebase' key.

I found that the CLSIDs are different by case (one that mentioned in dll and the one in registry) - is that a problem?

Also the Interface GUID doesn't have any reference to CLSIDs - is that necessary?
Mar 3 '09 #9
veki any thoughts on this?
Mar 3 '09 #10

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

Similar topics

13
by: Tom Bean | last post by:
I developed a C# application to automate input to elements of a web page displayed in an AxWebBrowser control. The app calls GetEnumerator() on the HTMLDocument's HTMLElementCollection (i.e....
4
by: tsui | last post by:
Dear all Someone say that past is Client/Server application, and now is distributed application, but i don't understand these terms Is it Client/Server application is mean two tiers, and only one...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
16
by: Simon Verona | last post by:
I have a problem with automating MS Word through vb.net My code is : Dim objword As new Word.ApplicationClass Try objWord.Documents.Open(letterfile)...
5
by: Siv | last post by:
Hi, A little while ago I asked if anyone could help me with how to create an email using MS Outlook that contained an embedded picture file. Thanks to Jay Harlow I was able to get this working...
2
by: Marty | last post by:
Hi, I would like to know about DLL and performance gain/penalty in an application. Let's say that I have a very big application and for component portability and easy maintenance, we fragmented...
5
by: Yoavo | last post by:
Hi, In my application I have to use som external COM dll's. In the code: using MyDll when I build the project, I get (in addition to the .exe file) a Dll called Interop.MyDll.dll I want to...
1
by: Don.Leri | last post by:
Hi, I have a logger.dll (unmanaged c++ dll compiled in vs2005). I have a C# interop to use that dll in managed code implemented in Interfaces.dll (used by other C# dlls). I also have a...
0
by: sganeshcse | last post by:
Hi All I am having VB.net and VC++.net windows applications. I am using the "MSSOAP30.dll" in both applications. When I include this MSSOAP30.dll in to vb.net application it is creating one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.