<?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 Method Service Call</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Remote Method Service Call</description>
  <pubDate>Sat, 11 Apr 2026 01:23:23 -700</pubDate>
  <lastBuildDate>Thu, 11 Apr 2013 08:08: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=4104</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 Method Service Call : Thanks.  This line from the sample...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16209#16209</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> 4104<br /><strong>Posted:</strong> 11-Apr-2013 at 8:08am<br /><br />Thanks.  This line from the sample should be added to the documentation:<br /><br />"Using the ServerMethodDelegate means that you must define a class/method stub on the client and use the same assembly name on the server as well as the client."<br /><br />In other words, the issue was that the Server Project dll name was different than the client assembly dll.  (The default project template of course adds "Web" to the end of the Server project dll name.)<br /><br />Greg]]>
   </description>
   <pubDate>Thu, 11 Apr 2013 08:08:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16209#16209</guid>
  </item> 
  <item>
   <title>Remote Method Service Call : Hi Greg,  The only thing I could...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16204#16204</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> 4104<br /><strong>Posted:</strong> 10-Apr-2013 at 3:56pm<br /><br />Hi Greg,<br /><br />The only thing I could think of is to check and make sure ServerMethods.cs has Build Action set to Compile in its properties.<br /><br />Besides that, I'd take a look at the sample at <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/code-sample-remote-server-method" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/code-sample-remote-server-method</a> and check for any subtle difference.]]>
   </description>
   <pubDate>Wed, 10 Apr 2013 15:56:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16204#16204</guid>
  </item> 
  <item>
   <title>Remote Method Service Call : I have a number of RMSC that work...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16203#16203</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> 4104<br /><strong>Posted:</strong> 10-Apr-2013 at 12:02pm<br /><br />I have a number of RMSC that work in DevForce 2010, but I can't seem to get them to work in 2012.  I can do a normal query and get entities back, so I don't think it is a EM configuration issue.<br /><br />I have tried this from a test project, and the error is always the same:<br /><br />System.IO.FileNotFoundException: Could not load file or assembly 'SilverlightApplication62' or one of its dependencies. <br /><br />ServerMethods.cs is linked to the SL project for the Delegate.<br /><br />This is the test Server Method:<br /><br />public static class ServerMethods<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#091;AllowRpc&#093;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static object GetNumberOfOrders(IPrincipal principal,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityManager entityManager, params Object&#091;&#093; args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 5;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />This is the SL call:<br /><br />public async void GetNumberOfOrderFromServer(int id) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var _entityManager = new JetAnalyticsEntities();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var serverMethod = new ServerMethodDelegate(ServerMethods.GetNumberOfOrders);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var returnValue = (int)await _entityManager.InvokeServerMethodAsync(serverMethod, id);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />I also tried it using strings:<br /><br />public async void GetNumberOfOrders2(int id)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try<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;  string typeName = "SilverlightApplication62.ServerMethods, SilverlightApplication62";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  string methodName = "GetNumberOfOrders";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  var result = (int) await _entityManager.InvokeServerMethodAsync(typeName, methodName, id);<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;catch (Exception ex)<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;  <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />The error message is always the same about the file could not be found.  I am assuming that it can't find ServerMethods.cs, as a breakpoint in the file is never hit.  This is the full error message from the log:<br /><br />Caught exception: System.IO.FileNotFoundException: Could not load file or assembly 'SilverlightApplication62' or one of its dependencies. The system cannot find the file specified. File name: 'SilverlightApplication62' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at IdeaBlade.Core.Reflection.ReflectionExtensions.LoadAssembly(String assemblyName) at IdeaBlade.Core.Reflection.ReflectionFns.GetLatestType(String pTypeName, Boolean pThrowOnError, Boolean pIgnoreCase) at IdeaBlade.EntityModel.Edm.RsmMethod.Create(String typeName, String methodName) at IdeaBlade.EntityModel.Edm.UdtMethodMap.GetRsmMethod(String typeName, String methodName) at IdeaBlade.EntityModel.Server.EntityServer.InvokeServerMethod(SessionBundle sessionBundle, InvokeServerMethodWorkState workState) at SyncInvokeInvokeServerMethod(Object , Object&#091;&#093; , Object&#091;&#093; ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object&#091;&#093; inputs, Object&#091;&#093;& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) === Pre-bind state information === LOG: User = DisplayName = SilverlightApplication62 (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: SilverlightApplication62 | Domain ID: 2 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///D:/Clients/Test/SilverlightApplication62Web/ LOG: Initial PrivatePath = D:\Clients\Test\SilverlightApplication62Web\bin Calling assembly : IdeaBlade.Core, Version=7.1.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0. === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\Clients\Test\SilverlightApplication62Web\web.config LOG: Using host configuration file: C:\Users\Administrator\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/1ae1acb2/bf9e6e56/SilverlightApplication62.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/1ae1acb2/bf9e6e56/SilverlightApplication62/SilverlightApplication62.DLL. LOG: Attempting download of new URL file:///D:/Clients/Test/SilverlightApplication62Web/bin/SilverlightApplication62.DLL. LOG: Attempting download of new URL file:///D:/Clients/Test/SilverlightApplication62Web/bin/SilverlightApplication62/SilverlightApplication62.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/1ae1acb2/bf9e6e56/SilverlightApplication62.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/1ae1acb2/bf9e6e56/SilverlightApplication62/SilverlightApplication62.EXE. LOG: Attempting download of new URL file:///D:/Clients/Test/SilverlightApplication62Web/bin/SilverlightApplication62.EXE. LOG: Attempting download of new URL file:///D:/Clients/Test/SilverlightApplication62Web/bin/SilverlightApplication62/SilverlightApplication62.EXE. <br /><br />]]>
   </description>
   <pubDate>Wed, 10 Apr 2013 12:02:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4104&amp;PID=16203#16203</guid>
  </item> 
 </channel>
</rss>