<?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 : How to call the following Remote Server methds</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : How to call the following Remote Server methds</description>
  <pubDate>Wed, 22 May 2013 03:37:45 -700</pubDate>
  <lastBuildDate>Wed, 19 Jan 2011 16:22:37 -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=2445</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>How to call the following Remote Server methds : Thank you so much. I finally have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9719#9719</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 4:22pm<br /><br />Thank you so much. I finally have it running. I did get an error about it taking to long to run. Should I use the push feature to get around this?<DIV>&nbsp;</DIV><DIV>Bill</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 16:22:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9719#9719</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Bill,   The example in the documentation...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9716#9716</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> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 12:14pm<br /><br />Bill, <DIV>&nbsp;</DIV><DIV>The example in the documentation is correct.</DIV><DIV>&nbsp;</DIV><DIV>You asked "<FONT color=#ff0000>what is entityManager initialized to</FONT>"</DIV><DIV>- For server-side code accepting an EntityManager we create a server-specific EM just for that particular use.&nbsp;In the case of RPC methods it's a bit different in that the type will usually be the type of the calling EM on the client.</DIV><DIV>&nbsp;</DIV><DIV>By the way, in an earlier post, you showed the following line of code:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>LaborWareEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> _manager = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>LaborWareEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.DefaultManager;</DIV><DIV><DIV></FONT></FONT>&nbsp;</DIV><DIV>Avoid using static EntityManagers in server-side code. The server code must be able to support multi-threading, and using a static EM means you're opening yourself up to unforeseen multi-threading errors later on. These threading problems usually don't show up in development and early testing, but they show up when you go into production.</DIV></DIV><DIV>&nbsp;</DIV><DIV>You mentioned "<FONT color=#ff0000>Here is your remote server method, it looks like even though you are calling it asychronously your GetQuery is a synchronous call</FONT>" </DIV><DIV>- Regardless of being called&nbsp;SYNCHRONOUSLY or ASYNCHRONOUSLY in the Client, the Server Method will be executed SYNCHRONOUSLY in the Server.</DIV><DIV>&nbsp;</DIV><DIV>You asked "<FONT color=#ff0000>is null, null the principal and the entitymanager</FONT>"</DIV><DIV>- InvokeServerMethodAsync has 3 overloads. The one shown in your post is:</DIV><strong>InvokeServerMethodAsync(String,String,Action&lt;InvokeServerMethodOperation&gt;,Object,Object&#091;&#093;)</strong> <DIV>&nbsp;</DIV><DIV>Here's a quote from our API documentation:</DIV><DIV>======================================================================</DIV><DIV><EM>Asynchronously invokes the specified static (Shared in Visual Basic) method for execution on the server. <BR><U>Syntax</U><BR>C#&nbsp;&nbsp; <BR>public InvokeServerMethodOperation InvokeServerMethodAsync( <BR>&nbsp;&nbsp; string fullTypeName,<BR>&nbsp;&nbsp; string methodName,<BR>&nbsp;&nbsp; Action&lt;InvokeServerMethodOperation&gt; userCallback,<BR>&nbsp;&nbsp; object userState,<BR>&nbsp;&nbsp; params object&#091;&#093; userArguments<BR>)<BR>&nbsp;<BR><U>Parameters</U><BR><strong>fullTypeName</strong> <BR>Assembly-qualified type name such as 'MyNamespace.Services, MyAssembly'<BR><strong>methodName</strong> <BR>Name of method to be invoked<BR><strong>userCallback</strong> <BR>Callback called when the operation completes<BR><strong>userState</strong> <BR>Token identifying the asynchronous request<BR><strong>userArguments </strong><BR>Arguments to be passed to method</EM></DIV><DIV>======================================================================</DIV><DIV>&nbsp;</DIV><DIV>You can reference DevForce API Documentation at <a href="http://drc.ideablade.com/Api&#068;ocumentati&#111;n/webframe.html" target="_blank">http://drc.ideablade.com/ApiDocumentation/webframe.html</A></DIV><DIV>and also in your machine (installed with DevForce) at <EM>Start&gt;Programs&gt;DevForce2010&gt;Documentation&gt;API Documentation</EM>.</DIV><DIV>&nbsp;</DIV><DIV>I am also attaching a simple Silverlight App invoking a Server Method based on the example in the <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/InvokeServerMethod" target="_blank">DevForce Resource Center</A>.</DIV><DIV>You can download the sample <a href="http://ideablade.com/friends/SilverlightInvokeServerMethod.zip" target="_blank">here</A>.</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 12:14:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9716#9716</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Is the documentation correct?...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9713#9713</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 10:36am<br /><br /><DIV =" code"><FONT color=#ff0000>Is the documentation correct?&nbsp; Here is your remote server method, it looks like even though you are calling it asychronously your GetQuery is a synchronous call. what is entityManager initialized to?</FONT></DIV><DIV =" code">&nbsp;</DIV><DIV =" code">&#091;AllowRpc&#093;<BR><SPAN style="COLOR: #0000ff">public</SPAN> <SPAN style="COLOR: #0000ff">static</SPAN> <SPAN style="COLOR: #2b91af">int</SPAN> GetNumberOfOrders(IPrincipal principal, EntityManager entityManager, <BR>&nbsp;&nbsp;<SPAN style="COLOR: #0000ff">params</SPAN> Object&#091;&#093; args) {<BR><BR>&nbsp;<SPAN style="COLOR: #008000">// Gather args<BR></SPAN>&nbsp;DateTime startDate = (DateTime) args&#091;0&#093;;<BR>&nbsp;&nbsp;DateTime endDate = (DateTime) args&#091;1&#093;;<BR><BR>&nbsp;<SPAN style="COLOR: #0000ff">return</SPAN> entityManager.GetQuery&lt;OrderSummary&gt;()<BR>&nbsp;&nbsp;&nbsp;&nbsp;.Where(os =&gt; os.OrderDate &gt; startDate &amp;&amp; os.OrderDate &lt; endDate)<BR>&nbsp;&nbsp;&nbsp;&nbsp;.Count();<BR>}<BR></DIV><DIV =" code"><FONT color=#ff0000>Here is the calling method</FONT></DIV><DIV =" code">&nbsp;</DIV><DIV =" code"><DIV =" code"><SPAN style="COLOR: #0000ff">public</SPAN> <SPAN style="COLOR: #0000ff">void</SPAN> GetOrderCount(DateTime startDate, DateTime endDate) {<BR>&nbsp;<SPAN style="COLOR: #2b91af">string</SPAN> typeName = <SPAN style="COLOR: #a31515">"DomainModel.OrderSummary, DomainModel"</SPAN>;<BR>&nbsp;<SPAN style="COLOR: #2b91af">string</SPAN> methodName = <SPAN style="COLOR: #a31515">"GetNumberOfOrders"</SPAN>;<BR><BR>&nbsp;&nbsp;var op = _em1.InvokeServerMethodAsync(typeName, methodName, <SPAN style="COLOR: #0000ff">null</SPAN>, <SPAN style="COLOR: #0000ff">null</SPAN>, startDate, endDate);&nbsp;<FONT color=#ff0000>&nbsp;is null, null the principal and the entitymanager<BR></FONT>&nbsp;&nbsp;op.Completed += (o, args) =&gt; {<BR>&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: #2b91af">int</SPAN> myResult = (<SPAN style="COLOR: #2b91af">int</SPAN>)args.Result;<BR>&nbsp;&nbsp;};<BR>}</DIV></DIV>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 10:36:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9713#9713</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds :  public static string CalculateAmountOwing(IPrincipal...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9712#9712</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 10:15am<br /><br /><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateAmountOwing(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IPrincipal</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> principal, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityManager</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> manager, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>params</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Object</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;&#093; args)</P><P>{</P><P></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Member</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> m = args&#091;0&#093; </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>as</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Member</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P>Paid = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>ObservableCollection</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DuesPaid</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;();</P><P>Owed = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>ObservableCollection</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DuesOwed</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;();</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> query1 = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>from</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DuesPaid</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>in</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> manager.</FONT></FONT><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas>DuesPaids&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; doesn't like manager</P></FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>orderby</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid.</FONT></FONT><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas>BatchDate</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>descending</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>where</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid.</FONT></FONT><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas>SocSecNo</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> == m.SocSecNo</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>select</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> results1 = query1.</FONT></FONT><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas>Execute</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DuesPaid</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;();</P><P>results1.</FONT></FONT><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas><FONT color=#ff0000 size=2 face=C&#111;nsolas>ForEach</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(Paid.Add);</P></FONT></FONT>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 10:15:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9712#9712</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Bill,  1. The Server Method...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9709#9709</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> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 9:34am<br /><br />Bill,<DIV>&nbsp;</DIV><DIV>1. The Server Method will run synchronously in the server, but the call to the server method is asynchronous because you are using InvokeServerMethodAsync. </DIV><DIV>i.e. </DIV><DIV>If you invoke the server method asynchronously (<EM>InvokeServerMethodAsync</EM>), the code in the client keeps going. Once the Server Method completes, the results are accessible in the callback.</DIV><DIV>If you invoke the server method synchronously (<EM>InvokeServerMethod</EM>), the code in the client halts until the Server Method completes. (pretty much like calling a method in the client itself) Then the code in the client continues.</DIV><DIV>&nbsp;</DIV><DIV>Assuming you are not running a Silverlight app, you could invoke the method synchronously by using InvokeServerMethod.</DIV><DIV>&nbsp;</DIV><DIV>2. I'm not sure I understand why it's not compiling. What line of code is causing the error? What is the error message?</DIV>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 09:34:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9709#9709</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Two issues I am still having.  I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9708#9708</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 19-Jan-2011 at 8:35am<br /><br />Two issues I am still having.<DIV>&nbsp;</DIV><DIV>I thought that the server methods that ran on the server could run synchronous methods. Do the executes and calls in my server methods have to be asychronous? This is what I am trying to do inside of CalculateAmountOwing()</DIV><DIV>&nbsp;</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>1. var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> query1 = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>from</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DuesPaid</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>in</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> _manager.DuesPaids</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>orderby</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid.BatchDate </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>descending</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>where</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid.SocSecNo == m.SocSecNo</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>select</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> DuesPaid;</P><P></FONT></FONT><FONT color=#ff3300><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> results1 = query1.Execute&lt;</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>DuesPaid</FONT></FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#ff3300>&gt;();</FONT></P><P>results1.ForEach(Paid.Add);</P><DIV></DIV><DIV>2. It will not compile my CalculateAmountOwing if I use the manager object being passed in. example I tried to do the following </DIV><DIV>&nbsp;</DIV><DIV>var query1 = from DuesPaid in manager.DuesPaids and it gave a compile error. Right now in my class I have the following</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>LaborWareEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> _manager = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>LaborWareEntities</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.DefaultManager;</P><DIV>&nbsp;</DIV><DIV>and&nbsp;I am using _manager to access all properties and it works fine.</DIV><DIV></FONT></FONT></FONT></FONT>&nbsp;</DIV></DIV>]]>
   </description>
   <pubDate>Wed, 19 Jan 2011 08:35:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9708#9708</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Bill,  You&amp;#039;d declare your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9704#9704</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> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 9:42pm<br /><br />Bill,<DIV>&nbsp;</DIV><DIV>You'd declare your server method as:</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>AllowRpc</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#093;</DIV><DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateAmountOwing(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IPrincipal</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> principal, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityManager</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> entityManager, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>params</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Object</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;&#093; args){</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas>&nbsp; <FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Member</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> member = args&#091;0&#093; </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>as</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Member</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp; ...</DIV><DIV><DIV></FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas>}</FONT></DIV></DIV></DIV><DIV>&nbsp;</DIV><DIV>and in your application you'd call it as follows:</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> typeName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"LaborWare2011.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</DIV><DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> methodName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"CalculateAmountOwing"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> op = Mgr.InvokeServerMethodAsync(typeName, methodName, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, CurrentMember);</FONT></FONT></DIV></DIV><DIV>&nbsp;</DIV><DIV>Are you defining your server method and invoking the method as stated above?</DIV><DIV>If yes, where exactly is the exception being thrown?</DIV><DIV>&nbsp;</DIV><DIV>Have you checked the documentation about Remote Server Method Calls in our <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/InvokeServerMethod" target="_blank">DevForce Resource Center</A>? </DIV><DIV>We'd appreciate some feedback on how we could make this information clearer.</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 21:42:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9704#9704</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : I think that I know what the problem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9703#9703</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 9:10pm<br /><br />I think that I know what the problem is now.<DIV>&nbsp;</DIV><DIV>What do I want for the second parameter for the CalculateAmountOwing method</DIV><DIV>&nbsp;</DIV><DIV>EntityManager mgr</DIV><DIV>or</DIV><DIV>LaborWareEntities mgr</DIV><DIV>&nbsp;</DIV><DIV>I tried using the EntityManager mgr and I get an error 'the type initializer for LaborWare2011.RemoteCalls.MemberBalanceCalculator threw an exception. System.TypeInitializationException: The type 'initializer for MemberBalanceCalculator threw an exeption. IdeaBlade.Core.IdeaBladeException: Type conflict: the defaultmanager is currently of type EntityManager.</DIV><DIV>&nbsp;</DIV><DIV>when I use my domain specfic manager it can't find the method because the signature is wrong.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 21:10:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9703#9703</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Ok now I got further. I get the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9702#9702</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 8:59pm<br /><br />Ok now I got further. I get the follwing error message<DIV>&nbsp;</DIV><DIV>unable to locate public method: MemberBalanceCalculator.CalculateAmountOwing</DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 20:59:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9702#9702</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : The error means that your assembly-qualified...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9701#9701</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> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 8:44pm<br /><br />The error means that your assembly-qualified type name is incorrect.<DIV>&nbsp;</DIV><DIV>As stated in our <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/InvokeServerMethod" target="_blank">DevForce Resource Center</A>, the full type name format is "<EM>MyNamespace.MyType, MyAssembly</EM>".</DIV><DIV>&nbsp;</DIV><DIV>So yours will most likely be</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#a31515 size=2 face=C&#111;nsolas>LaborWare2011.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web</FONT></DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 20:44:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9701#9701</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : I place a breakpoint inside of...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9700#9700</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 8:34pm<br /><br />I place&nbsp; a breakpoint inside of the server method and it never gets called.<DIV></DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 20:34:58 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9700#9700</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : I get an unhandled exceptions...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9699#9699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 8:25pm<br /><br />I get an unhandled exceptions code 4004 Category: ManagedRuntimeError<DIV>Message:EntityServerException: Could not load type</DIV><DIV>'LaborWare2011Web.RemoteCalls.MemberBalanceCalculator' from assembly 'LaborWare2011Web.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 20:25:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9699#9699</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Bill,  You are invoking the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9697#9697</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> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 8:14pm<br /><br />Bill,<DIV>&nbsp;</DIV><DIV>You are invoking the method asynchronously and once it's completed it will invoke the callback (if any).</DIV><DIV>&nbsp;</DIV><DIV>Are you saying that it is not getting to the callback at all?</DIV><DIV>&nbsp;</DIV><DIV>Are you getting any exceptions?</DIV><DIV>&nbsp;</DIV><DIV>Did you try stepping into the server method?</DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 20:14:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9697#9697</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Ok so I made the following change...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9695#9695</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 7:43pm<br /><br />Ok so I made the following change according to the documentation<DIV>&nbsp;</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateBalance()</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> typeName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"LaborWare2011Web.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P></P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> methodName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"CalculateAmountOwing"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> op = Mgr.InvokeServerMethodAsync(typeName, methodName, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, CurrentMember);</P><P>op.Completed += (o, args) =&gt; {</P><P>};</P><P>}</P><DIV></DIV><P>&nbsp;</P><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P>&#091;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>AllowRpc</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#093;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateAmountOwing(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IPrincipal</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> principal, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityManager</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> mgr, </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>params</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Object</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;&#093; args)</P><P>{</P><DIV></DIV><DIV></DIV>when I step through the code the call to InvokeServerMethodAsync does not call the server method, it just advances past the code.<DIV></DIV></FONT></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 19:43:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9695#9695</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Ok I changed the signature to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9693#9693</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 7:14pm<br /><br />Ok&nbsp; I changed the signature to the following<DIV>&nbsp;</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P>&#091;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>AllowRpc</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#093;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateAmountOwing(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>IPrincipal</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> principal, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityManager</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> manager, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Member</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> m)</P><P>{</P><P>so how do I call this method now. Is this correct?</P><DIV></DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> CalculateBalance()</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> typeName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"LaborWare2011Web.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P></P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> methodName = </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"CalculateAmountOwing"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> op = Mgr.InvokeServerMethodAsync(typeName, methodName, Mgr</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, CurrentMember);</P><P>op.Completed += (o, args) =&gt; {</P><P>};</P><P>}</P></FONT></FONT><P></FONT></FONT>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 19:14:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9693#9693</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : Hi Bill  Like previously stated...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9679#9679</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> 2445<br /><strong>Posted:</strong> 18-Jan-2011 at 1:05pm<br /><br />Hi Bill<DIV>&nbsp;</DIV><DIV>Like previously stated at </DIV><DIV><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=2407&amp;KW=&amp;PID=9505&amp;title=what-am-i-missing-in-this-remoteservermethod-call#9505" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=2407&amp;KW=&amp;PID=9505&amp;title=what-am-i-missing-in-this-remoteservermethod-call#9505</A></DIV><DIV>The method called must correspond to the <EM>ServerMethodDelegate</EM> signature:</DIV><DIV>&nbsp;</DIV><DIV><EM>public delegate object ServerMethodDelegate(<BR>&nbsp;&nbsp; IPrincipal principal,<BR>&nbsp;&nbsp; EntityManager serverEntityManager,<BR>&nbsp;&nbsp; params object&#091;&#093; args<BR>)</EM></DIV><DIV>&nbsp;</DIV><DIV><DIV>So your methods' signatures should look like:</DIV><DIV>&nbsp;</DIV><DIV><EM>public static double GetMemberDuesRate(</EM></DIV><DIV><EM>&nbsp; IPrincipal principal,</EM></DIV><DIV><EM>&nbsp; EntityManager server,</EM></DIV><DIV><EM>&nbsp;&nbsp;Member member, DateTime startDate, DateTime endDate</EM></DIV><DIV><EM>)</EM></DIV><DIV>&nbsp;</DIV><DIV>and</DIV><DIV>&nbsp;</DIV><DIV><EM>public static void CalculateBalanceOwing(</EM></DIV><DIV><EM>&nbsp; IPrincipal principal,</EM></DIV><DIV><EM>&nbsp; EntityManager server,</EM></DIV><DIV><EM>&nbsp; Member member</EM></DIV><DIV><EM>)</EM></DIV><DIV>&nbsp;</DIV><DIV>Make sure your parameters are serializable.</DIV><DIV>If&nbsp;for some reason you can't modify your methods to comply with the signature above, I suggest that you create compliant methods and call your methods within them.</DIV><DIV>&nbsp;</DIV><DIV>You can find valuable information about invoking server methods in our <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/InvokeServerMethod" target="_blank">DevForce Resource Center</A> and in the DevForce API documentation as well.</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV></DIV>]]>
   </description>
   <pubDate>Tue, 18 Jan 2011 13:05:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9679#9679</guid>
  </item> 
  <item>
   <title>How to call the following Remote Server methds : I am having trouble figuring out...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9667#9667</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 2445<br /><strong>Posted:</strong> 16-Jan-2011 at 6:13pm<br /><br />I am having trouble figuring out how to call the following Remote Server Methods.<DIV>&nbsp;</DIV><DIV>1. public static double GetMemberDuesRate(Member member, DateTime startDate, DateTime endDate) It is located in a folder called RemoteCalls in the LaborWare2011Web project.</DIV><DIV>&nbsp;</DIV><DIV>2. public static void CalculateBalanceOwing(Member member) it is also located in a folder called RemoteCalls in the LaborWare2011Web project.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 16 Jan 2011 18:13:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2445&amp;PID=9667#9667</guid>
  </item> 
 </channel>
</rss>