<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Remote Service Method Call</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Remote Service Method Call</description>
  <pubDate>Fri, 17 Apr 2026 00:35:19 -700</pubDate>
  <lastBuildDate>Wed, 29 Dec 2010 05:43:22 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2402</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Remote Service Method Call : Hi Silvio, Thanks very much,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9498#9498</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=579" rel="nofollow">gregweb</a><br /><strong>Subject:</strong> 2402<br /><strong>Posted:</strong> 29-Dec-2010 at 5:43am<br /><br /><P>Hi Silvio,</P><DIV>Thanks very much, I am going to try number 2 above.&nbsp; I found a good sample of this in the AuthenticationManager:</DIV><DIV>&nbsp;</DIV><DIV><PRE style="FONT-FAMILY: c&#111;nsolas"><SPAN style="COLOR: green">//&nbsp;Call&nbsp;a&nbsp;server-side&nbsp;method.&nbsp;&nbsp;Note&nbsp;type&nbsp;name&nbsp;must&nbsp;be&nbsp;fully-qualifed:&nbsp;&nbsp;MyNamespace.MyClass,&nbsp;MyAssemblyName</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">string</SPAN>&nbsp;typeName&nbsp;=&nbsp;<SPAN style="COLOR: #a31515">"Jet.RegistrationServices,&nbsp;Jet.Web"</SPAN>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">string</SPAN>&nbsp;methodName&nbsp;=&nbsp;<SPAN style="COLOR: #a31515">"CreateUser"</SPAN>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">var</SPAN>&nbsp;op1&nbsp;=&nbsp;Manager.InvokeServerMethodAsync(typeName,&nbsp;methodName,&nbsp;<SPAN style="COLOR: blue">null</SPAN>,&nbsp;<SPAN style="COLOR: blue">null</SPAN>,&nbsp;user,&nbsp;password);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">yield</SPAN>&nbsp;<SPAN style="COLOR: blue">return</SPAN>&nbsp;op1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #2b91af">CreateUserResult</SPAN>&nbsp;result&nbsp;=&nbsp;op1.Result&nbsp;<SPAN style="COLOR: blue">as</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">CreateUserResult</SPAN>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">if</SPAN>&nbsp;(result.Status&nbsp;!=&nbsp;<SPAN style="COLOR: #2b91af">CreateUserStatus</SPAN>.Success)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: green">//&nbsp;Throw&nbsp;an&nbsp;exception&nbsp;here&nbsp;-&nbsp;the&nbsp;caller&nbsp;can&nbsp;decide&nbsp;what&nbsp;to&nbsp;do.&nbsp;&nbsp;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">throw</SPAN>&nbsp;<SPAN style="COLOR: blue">new</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">RegistrationException</SPAN>(result);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</PRE></DIV><DIV>&nbsp;</DIV><DIV>I also tried setting the assembly name in the Project Properties to Jet from Jet.Web, and this also worked!&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Greg</DIV><span style="font-size:10px"><br /><br />Edited by gregweb - 29-Dec-2010 at 6:34am</span>]]>
   </description>
   <pubDate>Wed, 29 Dec 2010 05:43:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9498#9498</guid>
  </item> 
  <item>
   <title>Remote Service Method Call : Hi Greg,   You are getting this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9496#9496</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2402<br /><strong>Posted:</strong> 28-Dec-2010 at 4:27pm<br /><br />Hi Greg, <DIV>&nbsp;</DIV><DIV>You are getting this error because when you&nbsp;create a&nbsp;delegate in the client, its full type name is</DIV><DIV>&nbsp;</DIV><DIV><strong>Jet.Services.MailService, Jet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</strong></DIV><DIV>&nbsp;</DIV><DIV>but in the server, the Assembly name is most likely <strong>JetWeb</strong>. (I'm guessing&nbsp;the server assembly&nbsp;name is&nbsp;JetWeb based on the assumption that you created your project using the Silverlight template)</DIV><DIV>&nbsp;</DIV><DIV>To get rid of the error, you could:</DIV><DIV>1) change the Assembly name of the server to match the SL project's. This is possible, but NOT <SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-ansi-: EN" lang=EN>advisable as it could cause other adverse effects.</SPAN><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></DIV><DIV>&nbsp;</DIV><DIV>2) use the </DIV><DIV><strong>&nbsp; public InvokeServerMethodOperation InvokeServerMethodAsync(&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;string fullTypeName,<BR>&nbsp;&nbsp;&nbsp; string methodName,<BR>&nbsp;&nbsp;&nbsp; Action&lt;InvokeServerMethodOperation&gt; userCallback,<BR>&nbsp;&nbsp;&nbsp; object userState,<BR>&nbsp;&nbsp;&nbsp; params object&#091;&#093; userArguments<BR>&nbsp; )</strong><strong></strong></DIV><DIV>overload.</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Tue, 28 Dec 2010 16:27:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9496#9496</guid>
  </item> 
  <item>
   <title>Remote Service Method Call : I am trying to get a RSMC to work...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9479#9479</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=579" rel="nofollow">gregweb</a><br /><strong>Subject:</strong> 2402<br /><strong>Posted:</strong> 27-Dec-2010 at 5:53am<br /><br />I am trying to get a RSMC to work as per <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/QueryRSMC" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/QueryRSMC</A><DIV>&nbsp;</DIV><DIV>On the server I have a class called MailService like this:</DIV><DIV>&nbsp;</DIV><DIV><PRE style="FONT-FAMILY: c&#111;nsolas"><SPAN style="COLOR: blue">namespace</SPAN>&nbsp;Jet.Services<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">public</SPAN>&nbsp;<SPAN style="COLOR: blue">static</SPAN>&nbsp;<SPAN style="COLOR: blue">class</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">MailService</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;AllowRpc&#093;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">public</SPAN>&nbsp;<SPAN style="COLOR: blue">static</SPAN>&nbsp;<SPAN style="COLOR: blue">object</SPAN>&nbsp;GetNewMail(<SPAN style="COLOR: #2b91af">IPrincipal</SPAN>&nbsp;pPrincipal,&nbsp;EntityManager&nbsp;pPm,&nbsp;<SPAN style="COLOR: blue">params</SPAN>&nbsp;<SPAN style="COLOR: #2b91af">Object</SPAN>&#091;&#093;&nbsp;pArgs&nbsp;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Debug.WriteLine(<SPAN style="COLOR: #a31515">"Getting&nbsp;New&nbsp;Mail"</SPAN>);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">return</SPAN>&nbsp;<SPAN style="COLOR: #a31515">"Got&nbsp;Mail"</SPAN>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">I link this class in the SL project so I have a reference to it.  I then call it like this on the client:</PRE><PRE style="FONT-FAMILY: c&#111;nsolas"><PRE style="FONT-FAMILY: c&#111;nsolas"><SPAN style="COLOR: blue">internal</SPAN>&nbsp;<SPAN style="COLOR: blue">void</SPAN>&nbsp;GetMail()<BR>		{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">object</SPAN>&#091;&#093;&nbsp;parms&nbsp;=&nbsp;<SPAN style="COLOR: blue">new</SPAN>&nbsp;<SPAN style="COLOR: blue">object</SPAN>&#091;&#093;&nbsp;{&nbsp;<SPAN style="COLOR: #a31515">"Test"</SPAN>&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: green">//string&nbsp;methodName&nbsp;=&nbsp;"GetNewMail";</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #2b91af">ServerMethodDelegate</SPAN>&nbsp;del&nbsp;=&nbsp;Jet.Services.MailService.GetNewMail;<BR>			<SPAN style="COLOR: blue">var</SPAN>&nbsp;op&nbsp;&nbsp;=&nbsp;_mgr.InvokeServerMethodAsync(&nbsp;del,&nbsp;parms);<BR>		}</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">This compiles.  But when I run it, I get the following exception:</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">Unable to load type: Jet.Services.MailService, Jet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">I looked for a sample in DRC_SampleCode, but didn't find one.</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">Greg</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE></PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE><PRE style="FONT-FAMILY: c&#111;nsolas">&nbsp;</PRE></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 27 Dec 2010 05:53:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2402&amp;PID=9479#9479</guid>
  </item> 
 </channel>
</rss>