Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > VB.NET > Remoting

Remoting Discussion related to VB.NET remoting, concepts, techniques, etc.

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2008, 10:39 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Nov 2008
Posts: 2
Reputation: 0
poliskasi is on a distinguished programming path ahead
Default Remoting server to clients

Hello,
I need help with remoting issues that i'm trying to overcome.
Firstly, the application that i'm trying to develop has a multiple client single server application (Telephony application). The server code receives events of incoming calls and passes them to the client that is related to the call.
I've seen a lot of examples and i've already read the documentation on remoting and i also have been able to run several examples. My problem is that i cannot find an example on which the server initiates the communication, therefore I've tried to use the client code from the examples on the server side and server code from the examples on the client side. Unfortunately i couldn't make it work. The code that i'm using is the following.

Code:
Public Interface IRemotableType
    Sub _Name()
    Event calledByRemote()
End Interface
Client Side:
Code:
Public Class Listener
Inherits MarshalByRefObject

    Implements IRemotableType
    Private name As String = "Polys"

    Public Event calledByRemoteI() Implements IRemotableType.calledByRemote

    Public Sub _Name() Implements IRemotableType._Name
        RaiseEvent calledByRemoteI()
    End Sub

    Public Sub New()
        Try
            RemotingConfiguration.Configure("somename.config", False)
            Debug.WriteLine("Listening for requests. Press enter to exit...")

        Catch ex As Exception
            WriteToErrorLog(ex.ToString, ex.StackTrace, ex.Message)
        End Try
    End Sub
End Class
Config:

HTML Code:
<system.runtime.remoting>
    <application>
      <service>
        <activated type="IRemotableType, IRemotableType"/>
      </service>
      <channels>
        <channel ref="http" port="8989"/>
      </channels>
    </application>
  </system.runtime.remoting>
Server:

Code:
Dim communicator As IRemotableType
communicator = CType(Activator.GetObject(GetType(IRemotableType), "http://" & IPADDRESS & ":8989/IRemotableType.rem"), IRemotableType)
On the line marked with red i get the following error:

Quote:
System.Runtime.Remoting.RemotingException: Requested Service not found
Server stack trace:
at System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
In the case that i execute only this:
Code:
Activator.GetObject(GetType(IRemotableType), "http://" & IPADDRESS & ":8989/IRemotableType.rem")
I do not get an error but i do not get anything happening either.

Basically i want some way o be able to notify a specific client if an event occurs on the server.


Can you please help me....

Last edited by poliskasi; 12-03-2008 at 9:01 AM. Reason: Was not to the point
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 3:10 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.