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 - Host accessing service functionality and CallBacks with InstanceContextMode.Single

 
 
Old 10-18-2007   #1 (permalink)
Mike


 
 

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





My System SpecsSystem Spec
Old 10-25-2007   #2 (permalink)
Joe-P


 
 

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
>
>
>
>
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Is there a single-click methods of accessing my web space? ftp://login:password@mywebsite.com/ Vista General
VbSystemModal type functionality for Read-Host input PowerShell
Host accessing VPN connection from within VPC? Virtual PC
accessing $nestedprompt through C#/host rather ... PowerShell


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