XML-RPC i .Net Remoting [C#] - znikajace uslugi

0

Witam.

Mój problem przedstawia sie nastepujaco:

Buduje dwie aplikacje klient-serwer korzystajace ze zdalnego wywolywania procedur.
Odpalam serwer, odpalam klienta i wszystko dziala jak powinno.
Niestety, kiedy serwer pochodzi sobie troche dluzej, uslugi sie wyrejestrowywuja, a klient wywala blad.

Inicjalizacja serwera:

props = new Hashtable();
props["name"] = "MyHttpChannel"; // channel name
props["port"] = 5678; // channel port
channel = new HttpChannel(props, null, new XmlRpcServerFormatterSinkProvider());
ChannelServices.RegisterChannel(channel, false);
RemotingConfiguration.RegisterWellKnownServiceType(new WellKnownServiceTypeEntry(typeof(SendFileServer),"sendbytes.rem",WellKnownObjectMode.SingleCall));
/RemotingConfiguration.RegisterWellKnownServiceType(
typeof(SendFileServer),
"sendbytes.rem",
WellKnownObjectMode.Singleton);
/
remoteObject = new SendFileServer();
RemotingServices.Marshal(remoteObject, "sendbytes.rem", typeof(SendFileServer));



A ten kod wywoluje klient:

a) Inicjalizacja:

<code class="c#">
           chnl = new HttpChannel(null, new XmlRpcClientFormatterSinkProvider(), null);

        ChannelServices.RegisterChannel(chnl, false);

        /*Get the method implemetation from the server*/
        svr = (IServerInterface)Activator.GetObject(typeof(IServerInterface), "http://" + (string)Settings["Server IP"].Value + ":" + (string)Settings["Port"].Value + "/sendbytes.rem");

b) Wywolanie funkcji:

receivedArray = svr.SendBytes(); ``` (array to tablica bajtow, ale to nieistotne)

Tak jak mowie. Dziala dobrze, ale wyglada na to, ze uslugi (nie serwer, bo serwer klient widzi) po jakims czasie sa wyrejestrowane. Wywala wtedy fault exception [0] przy wywolaniu funckji serwera. Modul serwera nie moze byc zaladowany.
Bardzo prosze o pomoc, bo nie mam pojecia co to moze byc. Czy mozna jakos ustawic lifetime dla uslugi ?

0

To dziwne, ale problem przeszedl chyba sam od siebie. W każdym razie - nieaktualne.

0 użytkowników online, w tym zalogowanych: 0, gości: 0