Click here to Skip to main content
16,021,430 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Soap Error: Expired? Pin
Rocky Moore3-May-03 17:01
Rocky Moore3-May-03 17:01 
General.NET module assemblies Pin
leppie2-May-03 23:22
leppie2-May-03 23:22 
GeneralRe: .NET module assemblies Pin
leppie7-May-03 8:29
leppie7-May-03 8:29 
GeneralRe: .NET module assemblies Pin
George L. Jackson9-May-03 7:20
George L. Jackson9-May-03 7:20 
GeneralRe: .NET module assemblies Pin
leppie9-May-03 7:42
leppie9-May-03 7:42 
QuestionCustomizable 3rd party Dialog controls? Pin
Markri2-May-03 13:10
Markri2-May-03 13:10 
GeneralRemoting: Unregistering Sponsors Pin
Heath Stewart2-May-03 3:17
protectorHeath Stewart2-May-03 3:17 
GeneralRe: Remoting: Unregistering Sponsors Pin
dethsta8-May-03 9:52
dethsta8-May-03 9:52 
Tom Barnaby posted the following message on http://www.dotnet247.com/247reference/msgs/25/128945.aspx:

<clip>
I use what I call a "Disposing Sponsor" in situations where I need timely cleanup of a remote object when its lease expires. This is a server side sponsor that does NOT renew the lease but just calls dispose on the sponsored object. Here is an example: (lifted right out of my book Wink | ;-) )

class DisposingSponsor : ISponsor
{
private IDisposable mManagedObj;

public DisposingSponsor(IDisposable managedObj)
{
mManagedObj = managedObj;
}

public TimeSpan Renewal(ILease leaseInfo)
{
mManagedObj.Dispose();
return TimeSpan.Zero;
}
}

Then you simply register this sponsor with the remote object. This can be
done in a number of places, but a logical place is the remote object's
InitializeLifetime service method:

public override object InitializeLifetimeService()
{
ILease leaseInfo = (ILease)base.InitializeLifetimeService();

// Register a CustomerSponsor object as a sponsor.
leaseInfo.Register(new CustomerSponsor());

// Register a DisposingSponsor object
leaseInfo.Register(new DisposingSponsor(this));

// RegisterSponsors(leaseInfo);
return leaseInfo;
}

HTH
Tom Barnaby
Author: "Distributed .NET Programming in C#"
www.intertech-inc.com

</clip>

I used this approach to solve a similar situation and it worked great. I hope this helps!

-Guy
QuestionCan a 1.0 .NET App run on a 1.1 Framework? Pin
CyberKewl1-May-03 23:43
CyberKewl1-May-03 23:43 
AnswerRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
Stephane Rodriguez.2-May-03 1:13
Stephane Rodriguez.2-May-03 1:13 
GeneralRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
CyberKewl2-May-03 1:24
CyberKewl2-May-03 1:24 
GeneralRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
Stephane Rodriguez.2-May-03 1:41
Stephane Rodriguez.2-May-03 1:41 
GeneralRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
CyberKewl2-May-03 1:45
CyberKewl2-May-03 1:45 
GeneralRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
Albert Ho [msft]6-May-03 23:06
Albert Ho [msft]6-May-03 23:06 
AnswerRe: Can a 1.0 .NET App run on a 1.1 Framework? Pin
Anonymous6-May-03 20:27
Anonymous6-May-03 20:27 
GeneralIrDA with .NET Pin
Daniel Strigl1-May-03 21:17
Daniel Strigl1-May-03 21:17 
GeneralRe: IrDA with .NET Pin
leppie2-May-03 8:51
leppie2-May-03 8:51 
GeneralRe: IrDA with .NET Pin
Daniel Strigl2-May-03 9:05
Daniel Strigl2-May-03 9:05 
Generalvirtual methods on existing value types Pin
Ben Watson1-May-03 17:39
Ben Watson1-May-03 17:39 
GeneralRe: virtual methods on existing value types Pin
James T. Johnson1-May-03 17:57
James T. Johnson1-May-03 17:57 
Generalpaint application question Pin
lfsong30-Apr-03 0:41
lfsong30-Apr-03 0:41 
GeneralRe: paint application question Pin
J. Dunlap30-Apr-03 8:31
J. Dunlap30-Apr-03 8:31 
GeneralRe: paint application question Pin
lfsong1-May-03 17:55
lfsong1-May-03 17:55 
GeneralRe: paint application question Pin
James T. Johnson1-May-03 18:06
James T. Johnson1-May-03 18:06 
GeneralRe: paint application question Pin
lfsong2-May-03 5:30
lfsong2-May-03 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.