Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Passing instance data via ServiceHost

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 09-28-2006   #1 (permalink)
Chad Z. Hower
Guest


 

Passing instance data via ServiceHost

I have a single class which is used from mutliple ServiceHost
instances. I need this to simulate several environments on one machine.
I need to somehow pass some information from the time I create the
ServiceHost down to the contract class.

1) I looked for a static method or other that would be accesible from
the contract class, but did not find any.

2) I can use singleton constructor and pass an instance of the class
with the data. But the docs are very sparse and when it talks about
singleton and based on the error I received, it appears not only
singleton to serialize requests - I dont want that.

3) I could make them separate processes or appdomains, but I would
really prefer to avoid that for simplicity reasons as well as
manageablility.

--
"Programming is an art form that fights back"
http://www.KudzuWorld.com/
Need a professoinal technical speaker at your event? See www.woo-hoo.net

My System SpecsSystem Spec
Old 09-28-2006   #2 (permalink)
Chad Z. Hower
Guest


 

Re: Passing instance data via ServiceHost

Chad Z. Hower wrote:
> 3) I could make them separate processes or appdomains, but I would
> really prefer to avoid that for simplicity reasons as well as
> manageablility.


FWIW I put them in AppDomains. This allows me to control instance data
via statics in classes or the working directories.

But input still welcome for curiosity sake.

--
"Programming is an art form that fights back"
http://www.KudzuWorld.com/
Need a professoinal technical speaker at your event? See www.woo-hoo.net
My System SpecsSystem Spec
Old 10-01-2006   #3 (permalink)
Arkady Frenkel
Guest


 

Re: Passing instance data via ServiceHost

Why can't you use static class with multiple services in the same process
( domain ) , just a hint
Arkady

"Chad Z. Hower" <chad-ng@hower.org> wrote in message
news:OrYq7uy4GHA.1848@TK2MSFTNGP06.phx.gbl...
> Chad Z. Hower wrote:
>> 3) I could make them separate processes or appdomains, but I would
>> really prefer to avoid that for simplicity reasons as well as
>> manageablility.

>
> FWIW I put them in AppDomains. This allows me to control instance data
> via statics in classes or the working directories.
>
> But input still welcome for curiosity sake.
>
> --
> "Programming is an art form that fights back"
> http://www.KudzuWorld.com/
> Need a professoinal technical speaker at your event? See www.woo-hoo.net



My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic Class: Passing Data Type to Placeholder Etienne-Louis Nicolet .NET General 4 08-08-2008 01:42 AM


Update your Vista Drivers Update Your Vista Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008