Click here to Skip to main content
15,885,880 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Friends,
I am working with a .net remoting project. In my soution, i have the following code in three
projects. The problem is, i could not get value of LogInSuccessfull variable.




Public Interface MyInterface
      Sub TryToLogIn(ByVal UserName As String, ByVal UserPassword As String)
      ReadOnly Property LogInSuccessfull() As Boolean
   End Interface


   Imports System.Runtime.Remoting
   Imports ClassInterfaces

   Public Class ZoneLogIn
       Inherits MarshalByRefObject
       Implements ClassInterfaces.MyInterface

        Private mLogInSuccesfull As Boolean

        Public ReadOnly Property LogInSuccessfull() As Boolean Implements ClassInterfaces.MyInterface.LogInSuccessfull
          Get
             return mLogInSuccesfull
          End Get
       End Property

       Public Sub TryToLogIn(ByVal UserName As String, ByVal UserPassword As String) Implements  ClassInterfaces.MyInterface.TryToLogIn
         mLogInSuccesfull =true
         Console.WriteLine(mErrorMsg)
       End Sub

   End Class


   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim test As ClassInterfaces.MyInterface
       test = CType(Activator.GetObject(GetType(ClassInterfaces.MyInterface), "tcp://172.10.1.2:49341/ZoneLogIn.rem"), ClassInterfaces.MyInterface)
       test.TryToLogIn("test", "1234")

       MsgBox(test.LogInSuccessfull)
   End Sub



Would you help me what i am missing in the above code?
Thanking you in advance.

Regards
SKPaul
Posted
Comments
Sergey Alexandrovich Kryukov 14-Aug-11 16:36pm    
What seems to be a problem?
--SA
Keith Barrow 15-Aug-11 12:19pm    
Are you getting any errors? Whay is not working as expected?
We need more information if we are to help!

1 solution

Are you sure the object is created properly? Can you check if test IsNot Nothing after getting it from the URL?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900