Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Passing instance data via ServiceHost

 
 
Old 09-28-2006   #1 (permalink)
Chad Z. Hower


 
 

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


 
 

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


 
 

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


Similar Threads
Thread Forum
Generic Class: Passing Data Type to Placeholder .NET General


Vista Forums 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 Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46