Print Page | Close Window

Remote server method

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3215
Printed Date: 26-Mar-2025 at 5:45am


Topic: Remote server method
Posted By: rbautistaole
Subject: Remote server method
Date Posted: 13-Jan-2012 at 8:55am
Hi.
I´m test the silverlight sample to rsm. In the code i found this comments
 
// Using type/method names is not resilient to changes, but using the ServerMethodDelegate means that you must define a class/method stub on the client and use the same assembly name.
 
What do you mean with "and use the same assembly name."?
thanks.
 



Replies:
Posted By: DenisK
Date Posted: 17-Jan-2012 at 3:33pm
Hi rbautistaole,

This is one of those things that are clearer to see than explain. I've modified the Silverlight_RSM sample here to show what this means. Basically the structure of the solution is:

DomainModel
DomainModel.SL - Has file links to DomainModel. If you look at this project properties, I had changed the Assembly Name to DomainModel instead of DomainModel.SL
SimpleECS - Has reference to DomainModel.SL
SimpleECSWeb - Has reference to DomainModel

uploads/912/SimpleECS.zip - uploads/912/SimpleECS.zip

Hope this helps.


Posted By: rbautistaole
Date Posted: 18-Jan-2012 at 6:49pm

Hi.

Sorry.
I don´t see the point. I get an error in the second button, but this is invoke the rsm with the typename and methodName not with the ServerMethodDelegate.
 


Posted By: DenisK
Date Posted: 18-Jan-2012 at 8:06pm
Yes, that's because I didn't change the typeName on the second method since I was illustrating an example for ServerMethodDelegate. To make the second button works, change the typeName to

var typeName = "DomainModel.ServerMethods, DomainModel";


Posted By: katit
Date Posted: 18-Jan-2012 at 8:59pm
I was playing with those yesterday. Suggestion: Somehow make it work if DLL names differ. I think it's common to name DLL's like MyData.DLL and MyData.SL.dll which will make Delegate impossible..
 
Doing it by type name is not good at all..


Posted By: DenisK
Date Posted: 19-Jan-2012 at 11:47am
Thanks for the suggestion katit. I'm adding this as a feature request.



Print Page | Close Window