• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

.NET machine wide object

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    .NET machine wide object

    I could do with being able to create a single instance of a .NET object which is visible to any .NET process on a machine.

    The basic problem being that I have different clients which require exclusive use of a number of resources. I can detect that the resource is in use if a second client is started but this is a bit late, would rather be able to do it at start time.

    Any suggestions/examples ?

    Obviously it's simple enough to create a mutex or similar which is what I have done in the past, but I would like to associate some data with the object to share between some other processes.

    Don't want remoting, but may have to.

    Also, stuck at .NET 2.0

    #2
    Without understanding the background of your request any further I'd suggest that perhaps the object should be serialisable and stored in the database? That way you have safe / concurrent access to the same object and can wrap a proper transaction around the CRUD actions on it.

    If you consider session state in a web farm scenario it's the same. You end up using SQL Server for the most part to handle to the out of proc requirements for sharing access to the session object.

    Comment

    Working...
    X