Windows Vista Forums

Multiple endpoints
  1. #1


    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( );

    }
    }
    }

      My System SpecsSystem Spec

  2. #2


    q Guest

    Re: Multiple endpoints

      My System SpecsSystem Spec

Multiple endpoints problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
SBS 2008, Exchange 2007 - Multiple E-mail Domain & Multiple Mailbo DanielN SBS Server 4 16 Jan 2010
multiple signatures for multiple accounts? kv Live Mail 3 10 Nov 2009
Newbie question: replace multiple strings in multiple text files FenderAxe VB Script 15 01 Nov 2008
Media Center Multiple Tuner Cards Multiple satellite services sishak2010 Vista music pictures video 1 09 May 2008
WCF Endpoints Craig Indigo 4 22 Aug 2007