Click here to Skip to main content
15,889,116 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: BitBlt problem Pin
lfsong6-May-03 17:44
lfsong6-May-03 17:44 
GeneralRe: BitBlt problem Pin
lfsong6-May-03 8:10
lfsong6-May-03 8:10 
QuestionSoap Error: Expired? Pin
Rocky Moore3-May-03 15:51
Rocky Moore3-May-03 15:51 
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 
I'm having a problem with an architectural issue and the MS newsgroups are too slow, so here's to hoping...

I have a licensing service (hosted by a Windows Service) that essentially uses the number of registered sponsors as the current number of licenses granted. This is done using signed XML, a unique ID (the computer's SID), and a number representing the number of licenses granted. The service - after having read and verified the license information - increments the granted license count with each registered sponsor and decrements the count when a sponsor unregisters*, where 0 <= n <= m, where n is the number of registered sponsors and m is the max number of licenses. If a client can't get a license, they're booted from the system (after a friendly error message).

* Now, the problem is that the only thing in the entire .NET Framework (I've searched all the extracted IL with regex's) that calls ILease::Unregister (where I would decrement the count) is ClientSponsor::Unregister. Nothing in the .NET Framework calls ClientSponsor::Unregister, however. This becomes a problem in any case because the server basically has to know when a sponsor is dropped, whether they've expired, quit, or have been unloaded unexpectedly (perhaps from Environment::Exit after a fatal error, or the OS crashes).

So, I must take the DCOM approach and poll the sponsor list that I keep track of (I implement my own ILease). This is not a unacceptable idea since this will all probably happen on a local network, but I would rather avoid it.

So, is there any way that the lease can know when a sponsor is dropped without GC? If the item is GC'd on the client, can I expect that the item in the list is GC'd eventually as well? I guess I'm just hoping for some ideas to solve this counter problem.

PS: The remoting interface is merely a marker. All the actual work is done by the lease/sponsor relationship since a Register/Unregister mechanism already exists.


Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN

GeneralRe: Remoting: Unregistering Sponsors Pin
dethsta8-May-03 9:52
dethsta8-May-03 9:52 
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 

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.