Groups | Blog | Home
all groups > dotnet distributed apps > october 2005 >

dotnet distributed apps : Assembly or dependency not found using Remoting.



Luc
10/24/2005 7:41:02 PM
I have this particular problem. I am using .NET Remoting. My server (an
EXE) listening on a port has a reference (a dll) that is registered in the
GAC.

While trying to access a class in this reference (DLL) via my client, I
receive a remoting error stating that it cannot find the referenced dll.
unregistering my dll from the GAC and putting this one in the same directory
than my EXE causes no problem. Everything works fine. What seems to be the
Adam Boczek
10/25/2005 8:51:04 AM
How do you reference your assembly? When you make a dynamic reference to an
assembly by providing the calling method only with partial information about
assembly (e.g. only assembly name) then in this case only application
directory is searched for the assembly. You have to provide full reference
or call LoadWithPartialName method.

Adam


"Luc" <Luc@discussions.microsoft.com> schrieb im Newsbeitrag
news:060556DB-7CB5-4177-BE36-4C25C9D7222F@microsoft.com...
[quoted text, click to view]

Luc
10/30/2005 7:38:04 AM
Thank's for your reply,

Actually I am referencing it directly in the solution explorer. The path I
am using to reference it is the codebase path (ex: d:\apps\dgag\infr). But
when in the GAC, the assembly goes in the C:\Winnt\Assemblies subdirectory.

I am then calling the functions just by invoking the method in the proxy
(client side) which in turn is calling the real object on the server side
using remoting. Then BANG.

How should I make this reference when compiling my service on the server
side to avoid this behavior?

[quoted text, click to view]
Luc
11/2/2005 5:36:05 PM
Thank's for answering Ice. But the GAC problem reside on the server side.
When both my service and the dll are residing in the same directory, I have
no problem. Putting away my dll in another directory and registering it in
the GAC causes this message. are you saying that the qualifyAssembly element
can correct the problem?


[quoted text, click to view]
Luc
11/2/2005 6:19:03 PM
I read a bit more about the qualifyAssembly element and it's impact on my
problem. I think it will work but I still have this question before using
this method:

Before going to the GAC, this assembly was in the local directory of my EXE.
When I compiled my EXE, I assume the information about this assembly went in
the manifest of my EXE with only partial name information. It's only then I
decided to put my assembly in the GAC giving it a strong name.

Is it because I didn't recompiled my EXE while my dll was in the GAC that
the problem occured? Is the full name information of my assembly stored in
the manifest of my EXE because it's now in the GAC and it can find it more
easily?

And finally, which method is invoked in the EXE to load my assembly when
a) my EXE is built while my assembly is referneced in the same directory
with no strong name?
b) my EXE is built while my assembly is referenced in the GAC?

Is it the same method but the manifest gives partial or full name information?

Thank's for the info.

[quoted text, click to view]
Ice
11/2/2005 6:41:11 PM
the remoting infrastructure on the client doesn't look in the GAC. to use
the GAC you have to the qualify the assembly. look at the qualifyAssembly
element.
[quoted text, click to view]

Ice
11/3/2005 2:41:36 PM
You never really reference assemblies in the GAC. I guess you should try
compiling your assembly against the strong-named version of your assembly.
I've never tried that scenario explicitly.
[quoted text, click to view]

AddThis Social Bookmark Button