thanray

thanray

  • NA
  • 1
  • 0

.net remoting, bug when the client start

Feb 6 2004 3:58 AM
Hi, I have been trying to use .net remoting to get access to two objects in the server (or instans). First I created a dll file with the to interfaces, iCreateAccount("username") which return a iAccountOpperation object. The AccountOpperation interface is also described in the dll file (account interface). Then I started with the server (bankServer), where i implement the classes CreateAccount and AccountOperation. The server runs fine when i start it. But when i start the client i get a error. I get following message when i try to create a CreateAccount("useraname") The interface: namespace accountInterface { // Account interface, returns an obj for opperation on that interface public interface iBank { iAccOpp CreateAcc(string username); } // Account opperation interfaces public interface iAccOpp{ //int GetAccount(string username) int Credit(int ammount); int Debet(int ammount); string Status(); } } And here is the some code from the client file: ChannelServices.RegisterChannel(new TcpClientChannel()); iBank bankService = (iBank)Activator.GetObject(typeof(iBank), "tcp://localhost:9988/iBank"); Console.WriteLine("Ready to call the iBank.CreateAccount object"); string username = "thanray"; ExceptExample testInstance = new ExceptExample(); try { ---> acc = bankService.CreateAcc(username); The client crash here (when i try to create a iAccout opperation object). I have been suffering with this in a couple days, withaout finding any solution. Following msg i get in console: Ready to call the iBank.CreateAccount object, and the excetpion: ---->In main catch block. Cought: No receiver registered. Can any body help me please..