473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

unpleasant remoting problem

Hi All!
I have a .NET remoting Client-Server application with Server Activated
Objects only..
something is worrying me.. sometimes (rarely), I can't connect to the server
although it is running.

I get the exception saying "A socket operation was attempted to an
unreachable host".. it means that it behaves the same as if the server
wasn't running.

Firewalls are not the problem here for sure.

I know you can't solve my problem just by knowing this information, but I
wanted to ask you how should I tackle it? with what tools..? is there some
special settings that I can use to force the server at least throw some
exception instead of refusing to accept connections silently.

Thank you!!!!

More code and info about the exception:
CLIENT:

**** example of getting one server-created object refernce

file_transfer_server_view = (FileTransferServerView) Activator.GetObject(
typeof(FileTransferServerView),
"tcp://"+address+"/FileTransferServerView" );
SERVER: Windows Service application
********* INIT ************

//because of security restrictions, the type ObjRef cannot be accessed
//occurs when we want to send MarshalByObjRef as a parameter somewhere
BinaryServerFormatterSinkProvider serverProvider = new
BinaryServerFormatterSinkProvider();

serverProvider.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilter Level.Full;

BinaryClientFormatterSinkProvider clientProvider = new
BinaryClientFormatterSinkProvider();

IDictionary props = new Hashtable();
props["port"] = ProjektiServerService.port_num;

TcpChannel channel = new TcpChannel(props, clientProvider, serverProvider);
ChannelServices.RegisterChannel(channel);
Success = true;

*************** example of registering one object ************

RemotingConfiguration.RegisterWellKnownServiceType (
typeof(Projekti.FileTransferServerView),
"FileTransferServerView", WellKnownObjectMode.Singleton );
************ server.config file: ***************
<?xml version="1.0"?>

<configuration>

<system.runtime.remoting>
<customErrors mode="Off"></customErrors>
</system.runtime.remoting>

</configuration>

*************** ERROR I GET AT THE CLIENT, ALTHOUGH THE SERVER SEEMS FINE
(but it's not obviously) **************

A socket operation was attempted to an unreachable host

Server stack trace:
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection. CreateNewSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSo cket(String
machineAndPort)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTran sportSink.SendRequestWithR
etry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at
System.Runtime.Remoting.Channels.Tcp.TcpClientTran sportSink.ProcessMessage(I
Message msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessag
e(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at System.Object.FieldGetter(String typeName, String fieldName, Object&
val)
at Projekti.Form1..ctor() in c:\documents and settings\david krmpotic\my
documents\visual studio projects\projekti\projekticlient\mainform.cs:line
208
at Projekti.Form1.Main(String[] args) in c:\documents and settings\david
krmpotic\my documents\visual studio
projects\projekti\projekticlient\mainform.cs:line 729
Nov 16 '05 #1
1 2667
oh , it's win2k, VS 2003, .net 1.1

thank you again!

and that happened on the same machine... (the client and the server were
running on the same machine)
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: anders | last post by:
Hi! I have a config file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="SingleCall"...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
0
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
5
by: LGHummel | last post by:
I'm trying to host a remoting app in IIS and am getting the following error: Failed to execute the request because the ASP.NET process identity does not have read permissions to the global...
9
by: swartzbill2000 | last post by:
Hello, I am trying to build and run the Remoting Sample from MSDN. Everything compiles. The Listener appears to run. The Client throws this RemotingException: A first chance exception of type...
0
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false);...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.