473,395 Members | 1,379 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,395 software developers and data experts.

problem with client activated object lease time

Hi

I have a problem with my client activated objects. The service has
very short lease time. Client calls function GetProdct(2,3) which
saves
total product of 6. Then client performs Thread.Sleep(6) which is
longer
than service lease time. When I call GetProdct again the total is 12
(6+6). Why
the object is not leased? - if i use wellknown (Singleton ) the object
is propertly leased ( total sum is back 0 )

Also how can I get wsdl of the service? In wellknown it is simple - i
can clearly specify path - I
need it for SOAPSUDS

Here are server and client configuration files:

///SERVER
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="asd">
<lifetime leaseTime="1s" sponsorshipTimeout="1s"
renewOnCallTime="1s" />
<service>
<activated type="RemoteClass.Mathematica, RemoteClass"/>
</service>
<channels>
<channel ref="http" port="5000">
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>

///CLIENT
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name="RemoteClient">
<client url="http://localhost:5000">
<activated type="RemoteClass.Mathematica, RemoteClass"/>
</client>
<channels>
<channel ref="http" port="0">
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>

RemotingConfiguration.Configure("RemoteClient.exe. config",false)
RemoteClass.Mathematica obj = new RemoteClass.Mathematica();

Console.WriteLine(obj.GetProduct(2, 3));
Console.WriteLine(obj.Total);

Thread.Sleep(6000);

Console.WriteLine(obj.GetProduct(2, 3));
Console.WriteLine(obj.Total);
Console.WriteLine(obj.GetHostLocation()); // obj is in the proper
//AppDomain ( server app domain )
Console.ReadLine();

Best Regards
Piotr Kolodziej
Jun 27 '08 #1
0 977

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

Similar topics

2
by: JJ | last post by:
I want to create a client activated object using TcpChannel. The only way I could get it to work, though, is to provide the client with the remoted object's implementation. I'd rather not do this. ...
4
by: Martin Maat | last post by:
Hi. I am using a COM component from managed code doing the following: Type type = Type.GetTypeFromCLSID(new Guid("B70FAAE6-4F85-480A-B1C5-DC9A6F175BFC"), serverMachineName, true); history =...
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...
0
by: Tomislav Bartolin | last post by:
Hi, I have a singleton and a singlecall MBR objects hosted by IIS. Singleton object can be activated either by the singlecall object or by the remote client application. I want the singleton...
4
by: dynastar | last post by:
I'm trying to send custom COMExceptions from my C# server. My test client in C# has no problem reading the HRESULT I send (say, 0x80040002). Needless to say, the MFC client in C++ allows this...
12
by: Steven Berkovitz | last post by:
I have several ASP.NET applications with near identical web.config files. In one of them I am successfuly able to bind to an assembly while on others I am not. All of them have the following...
1
by: Steve K. | last post by:
I'm working on my first remoting project. It's going well and I have one (that I know of!) bug left to work out. I understand how remote objects have leases and those leases expire. I fixed a...
0
by: Piotrekk | last post by:
Hi I have a problem with my client activated objects. The service has very short lease time. Client calls function add(2,3) which saves total sum of 6. Then client performs Thread.Sleep(6) which...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.