LifetimeServices.LeaseTime Property

 

Gets or sets the initial lease time span for an AppDomain.

Namespace:   System.Runtime.Remoting.Lifetime
Assembly:  mscorlib (in mscorlib.dll)

public static TimeSpan LeaseTime {
	get;
	[SecurityCriticalAttribute]
	[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.RemotingConfiguration)]
	set;
}

Property Value

Type: System.TimeSpan

The initial lease TimeSpan for objects that can have leases in the AppDomain.

Exception Condition
SecurityException

At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value.

The default lease time span is 5 minutes.

SecurityPermission

for configuration of the remoting infrastructure. Demand value: SecurityAction.Demand; Permission value: SecurityPermissionFlag.RemotingConfiguration

.NET Framework
Available since 1.1
Return to top
Show: