remoting error : Invalid URI: The hostname could not be parsed.

J

John A Grandy

XP Pro SP3

Visual Studio 2005 SP2

This .NET 2.0 app involves running a WinForms app ( the client ) which makes
remoting calls to another Windows Application ( the server ) which listens
on a specific port (8075).

( Note that in prod, the server is run as a Windows Service. )

My remote calls have been working flawlessly for 18 months.

Now, today, it stops working.

On remote object creation , I receive the error :

Invalid URI: The hostname could not be parsed.


I work in debug mode : first I debug start the server, then I debug-start
the client.

The server class I wish to make a remote call to is defined as

MyClass : MarshalByRefObject

I create remote objects as follows :

MyClass remoteMyClass = MyClass.GetRemoteObject( "localhost", 8075 );


public static MyClass MyClass.GetRemoteObject( string server, int port )
{
SmsRemotingChannelManager.OpenSmsTcpRemotingChannel(
ConfigurationAccessor.EnableRemotingEvents );

MyClass remoteObject = (MyClass)Activator.GetObject( typeof( MyClass),
"tcp://" + server + ":" + port + "/MyClass.rem" );

return remoteObject;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top