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

Host accessing service functionality and CallBacks with InstanceContextMode.Single

 
 
Thread Tools Display Modes
Old 10-18-2007   #1 (permalink)
Mike
Guest


 

Host accessing service functionality and CallBacks with InstanceContextMode.Single

Hi,



I have a service hosted inside a windows application.

I also a have a client requesting information thru the service, I
created a proxy from the service thru the 'Add service reference' menu
item.

Once in a while I need the windows application hosting the service to
also request some information from the service, so I created a proxy in
the windows application with the 'Add service reference' as well. Is
this standard practice?



Ultimately, I need both client and host to be able to query services.



Another question that I have is that if it's possible to have callbacks
in a service which is declared as InstanceContextMode.Single:



<ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple,
InstanceContextMode:=InstanceContextMode.Single)>



Thanks,

Mike




Old 10-25-2007   #2 (permalink)
Joe-P
Guest


 

RE: Host accessing service functionality and CallBacks with InstanceCo


When you add service reference you are technically creating a proxy to
access the service.

Since you have the Assembly you should be able to get to it directly.
Moreover it is sign of "need for re-architecting" if the host has to do a
reference to its own service.

You can use InstanceContextMode.Single in a wsDualHttpBinding protocol.




"Mike" wrote:
Quote:

> Hi,
>
>
>
> I have a service hosted inside a windows application.
>
> I also a have a client requesting information thru the service, I
> created a proxy from the service thru the 'Add service reference' menu
> item.
>
> Once in a while I need the windows application hosting the service to
> also request some information from the service, so I created a proxy in
> the windows application with the 'Add service reference' as well. Is
> this standard practice?
>
>
>
> Ultimately, I need both client and host to be able to query services.
>
>
>
> Another question that I have is that if it's possible to have callbacks
> in a service which is declared as InstanceContextMode.Single:
>
>
>
> <ServiceBehavior(ConcurrencyMode:=ConcurrencyMode.Multiple,
> InstanceContextMode:=InstanceContextMode.Single)>
>
>
>
> Thanks,
>
> Mike
>
>
>
>
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Host service??? Andrew Marin Vista General 3 02-25-2007 09:53 AM
accessing $nestedprompt through C#/host rather ... Karl Prosser PowerShell 3 09-04-2006 03:34 PM








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

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 47 48 49 50