Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7570857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:31:24+00:00 2026-05-30T15:31:24+00:00

I want to run two instance of my program on my machine. Each instance

  • 0

I want to run two instance of my program on my machine.
Each instance needs localhost named pipe:

_host = new ServiceHost(typeof(ManagementConsole),
            new Uri[]
            {
                new Uri("net.pipe://localhost")
            });

_host.AddServiceEndpoint(typeof(IManagementConsole),
     new NetNamedPipeBinding(),
     "PipeManagementConsole");

_host.Open();

In another instance of my program I use PipeManagementConsole2

So clients supposed to used net.pipe://localhost/PipeManagementConsole and net.pipe://localhost/PipeManagementConsole2.

However Windows doesn’t allow second instance of my program to run, it claims that net.pipe://localhost is already in use (and it is), how can I fix this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:31:25+00:00Added an answer on May 30, 2026 at 3:31 pm

    different address should be specified when creating ServiceHost, not when calling AddServiceEndpoint.

    This code works fine:

    _host = new ServiceHost(typeof(ManagementConsole),
                                new Uri[]
                                {
                                    new Uri("net.pipe://localhost/2")
                                });
    
    _host.AddServiceEndpoint(typeof(IManagementConsole),
        new NetNamedPipeBinding(),
        "PipeManagementConsole");
    
    _host.Open();
    

    Clients should use "net.pipe://localhost/2/PipeManagementConsole"

    But this code doesn’t work:

    _host = new ServiceHost(typeof(ManagementConsole),
                            new Uri[]
                            {
                                new Uri("net.pipe://localhost")
                            });
    
    _host.AddServiceEndpoint(typeof(IManagementConsole),
        new NetNamedPipeBinding(),
        "PipeManagementConsole2");
    
    _host.Open();
    

    if net.pipe://localhost/PipeManagementConsole is already in use

    I don’t know why net.pipe://localhost/2/PipeManagementConsole is better than net.pipe://localhost/PipeManagementConsole2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just want to find out how to run two WPF windows (one in
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I want to run an Apache on my local machine since I can only
On a non-production machine, I have two instances of SQL Server 2005. I want
I have two * Servlet * and i want to run both Servlet on
I want to run Visual Studio 2010 with two commands: devenv.exe /nosplash devenv.exe /safemode
I'm trying to perform an action periodically. I want to create a new instance
Let's say I want to run an external program from my script with backticks
I have two jobs: Upload Launch-instance I want to make Launch-instance dependent on the
I want to develop a certain plugin/extension, which needs to run in eclipse and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.