Print Page | Close Window

RSMC not working if assembly is placed in GAC

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4236
Printed Date: 28-Mar-2025 at 2:40am


Topic: RSMC not working if assembly is placed in GAC
Posted By: rasmus
Subject: RSMC not working if assembly is placed in GAC
Date Posted: 19-Jul-2013 at 9:05am
Hi

I have a problem using RSMC. I am placing my binaries in the GAC, but the server seems to only probe the bin directory for the assembly holding the method.

How do I direct the call to the assembly in the GAC and not to the bin-directory.

Best regards,
Rasmus



Replies:
Posted By: kimj
Date Posted: 19-Jul-2013 at 9:37am
DevForce doesn't actually probe for remote server methods.  Instead it uses reflection, trying to do a Type.GetType on the fully-qualified name of the type holding the method.  If not found it tries to load the assembly, given the assembly name in the fq type name.  Exceptions will be logged in the server's debug log, so check there to see if anything was logged which could help diagnose the problem.


Posted By: rasmus
Date Posted: 20-Jul-2013 at 1:22pm
Hi

The problem is this: To make the RSMC work, I have to place my dommainmodel assembly in the Webhome/bin directory.

What I would like instead is for the DevForce to check the GAC for the assembly, as this is where I have placed it now. I have a 100+ sites using the assembly so therefore it is not an alternative for me to have to place the domainmodel assembly in the /bin directory of the webhome.





Posted By: kimj
Date Posted: 20-Jul-2013 at 2:31pm

You need to provide the assembly qualified type name in the InvokeServerMethod call, and provide enough assembly information so that an Assembly.Load() will work.  Something like:

   "MyNamespace.MyType, MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxx"


Posted By: rasmus
Date Posted: 22-Jul-2013 at 11:50pm
That helped!

Thanks :-)



Print Page | Close Window