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

Multiple endpoints

 
 
Thread Tools Display Modes
Old 03-04-2006   #1 (permalink)
q
Guest


 

Multiple endpoints

Aynone ever get this to work? This is a critical scenario... the
other critical scenario is having more than one endpoint on the same
IIS hosted service.

[Go-live version]

using System;
using System.ServiceModel;

namespace DemoStuff
{
[ServiceContract]
interface IDemoService
{
[OperationContract]
string GetText( );
}

class DemoService : IDemoService
{
public string GetText( ) {
{
return "Stuff";
}
}
}

class Program
{
static void Main(string[] args) {
Uri basicHttpUri = new
Uri("http://localhost:8081/Service/");
Uri httpDualUri = new
Uri("http://localhost:8082/Service/");
ServiceHost hService = new
ServiceHost(typeof(DemoService));

hService.AddServiceEndpoint(typeof(IDemoService), new
BasicHttpBinding( ), basicHttpUri);
hService.AddServiceEndpoint(typeof(IDemoService), new
WSDualHttpBinding( ), httpDualUri);

hService.Open( );
Console.WriteLine("Service at your service.");
Console.ReadKey( );
hService.Close( );

}
}
}

Old 03-04-2006   #2 (permalink)
q
Guest


 

Re: Multiple endpoints

 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Media Center Multiple Tuner Cards Multiple satellite services sishak2010 Vista music pictures video 1 05-09-2008 04:07 PM
Multiple Ip and Multiple Proxy kurshid razzak Vista networking & sharing 0 12-13-2007 03:39 AM
Multiple OS Mike Vista installation & setup 6 04-11-2007 12:02 PM
Sorry for the multiple posts! thewizz Vista General 4 10-15-2006 07:13 AM








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