Print Page | Close Window

What am I missing in this RemoteServerMethod call

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=2407
Printed Date: 29-Jun-2026 at 5:45am


Topic: What am I missing in this RemoteServerMethod call
Posted By: BillG
Subject: What am I missing in this RemoteServerMethod call
Date Posted: 30-Dec-2010 at 11:24am
So in my LaorWare2011Web project I have a folder named RemoteCalls and in there is a class called MemberBalanceCalculator defined as follows:
 
namespace LaborWare2011Web.RemoteCalls
{
      public static class MemberBalanceCalculator
      {
 
             [AllowRpc]
             public static object CalculateAmountOwing(Member member)
            {
                     // a bunch of calculations.......
 
                     return member;
             }
      }
}
 
In my MemberEditViewModel class, I have a method that will call this remote method.
 
public void CalculateBalance()
{
      string typeName = "LaborWare2011Web.RemoteCalls.MemberBalanceCalculator, LaborWare2011Web";
      string methodName = "CalculateAmountOwing";
      var op = Mgr.InvokeServerMethodAsync(typeName, methodName, null, CurrentMember);
      op.Completed += (o, args) => {
      };
}
 



Replies:
Posted By: sbelini
Date Posted: 30-Dec-2010 at 12:09pm

The signature for your remote method should be

public static Object CalculateAmountOwing(IPrincipal pPrincipal, EntityManager pPm, params Object[] pArgs)



Print Page | Close Window