-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Sitaraman
Message 8 in Discussion
Hi !!! Check the IP and the port number you are passing as the uri variable(2nd
parameter) to the RegisterWellKnownClientType() Note that initially when i tested i
didnt use the
RemotingConfiguration.RegisterWellKnownClientType(GetType(Dataconnection.Connection),
url)
but an existing config file and VS.Net solution, which is tried and tested. So i
didnt get the error Implemented it in your way and tested it. The culprit must be
the uri parameter u are passing to the
RemotingConfiguration.RegisterWellKnownClientType. If the uri provided is correct,
the functions work fine. In case it is wrong as in the following situations, then the
error message is as follows. Im giving a list of various mistakes that we might make
and the corresponding error messages we will get If Server Code is
Dim Channel As TcpChannel = New TcpChannel(10000)
ChannelServices.RegisterChannel(Channel)
RemotingConfiguration.ApplicationName = "MultiConfigChat"
Dim x As New ChatCoordinator()
RemotingConfiguration.RegisterWellKnownServiceType(x.GetType, "Connection",
WellKnownObjectMode.Singleton)
then in the client code 'Correct URI works
Dim l_strUri As String = "tcp://160.240.189.144:10000/Connection"
'URI With wrong Protocol
'Dim l_strUri As String = "http://160.240.189.144:10000/Connection"
'Unhandled Exception: System.Net.WebException: The underlying connection was
closed: An unexpected error occurred on a receive.
' URI with machine whose IP is Invalid
'Dim l_strUri As String = "tcp://160.240.189.189:10000/Connection"
' Takes a long time and then throws a message whose translation is as follows :
' Even if fixed time was passed calling of the connection ahead, it was not
possible to
'connect it because it had not responded correctly. Or, the established
connection failed
'because the connected host had not responded.
' URI with machine whose IP is valid(machine is there in
network with the IP specified), but service is not running
'Dim l_strUri As String = "tcp://160.240.189.48:10000/Connection"
' An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in mscorlib.dll
' Additional information: No connection could be made because the target
machine actively refused it.
' "System.Net.Sockets.SocketException()
' URI with wrong port
' Dim l_strUri As String = "tcp://160.240.189.144:10001/Connection"
' An unhandled exception of type 'System.Net.Sockets.SocketException' occurred
in mscorlib.dll
' Additional information: No connection could be made because the target
machine actively refused it.
' "System.Net.Sockets.SocketException()
' URI with wrong objecturi
'Dim l_strUri As String = "tcp://160.240.189.144:10000/Connection2"
' Object </Connection2> has been disconnected or does not exist at the server.
RemotingConfiguration.RegisterWellKnownClientType(GetType(ChatCoordinator),
l_strUri) Here your problem is either coz of pt 4. or pt 5. above. So in your
case the uri variable passed to the should be Dim url as string="
"tcp://127.0.0.1:10000/Connection" , where tcp=protocol, 127.0.0.1=loopback ip, will
work if u are using same machine for server and client, else give the IP of the
server, 10000=Server port, Connection= object uri specified as 2nd parameter to
RegisterWellKnownServiceType()while registering the Service in your server code
Check this out and correct it and hope that solves your problem regards, sr
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]