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 5965715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:40:30+00:00 2026-05-22T19:40:30+00:00

I am currently working on an application where I am creating a ServiceHost, then

  • 0

I am currently working on an application where I am creating a ServiceHost, then getting rid of it, then recreating it later. The problem is that once I get rid of the service host when I try to recreate it I get the exception “A registration already exists for URI after stop/start.” The weird thing is I have three separate hosts and one works and two don’t. I assume something is not being disposed of properly but I’m not sure why.

I am creating the hosts like this

host = new ServiceHost(typeof(MyService));
host.Open();

Then getting rid of them like so

if (host != null)
{
    host.Close();
    host = null;
}

I have also tried abort instead of close without any luck.

  • 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-22T19:40:31+00:00Added an answer on May 22, 2026 at 7:40 pm

    Though I am not sure about the exact issue, I can give you a little thought on it and some workaround.

    If you are working in Windows 7, any URL you create as part of your hosting has to get registered. Netsh command usually helps us register and unregister the URLs.

    For both registering and unregistering URIs you need to have admin permission.

    You may try the following.

    1. If you are running your exe, try running it in Administrator mode. (Right click and select admin mode).

    2. If you are trying out with visual studio, try to restart the visual studio in admin mode and run the app.

    3. Try to unregister the URI and try again using Netsh.

    http://saravananarumugam.wordpress.com/2011/03/01/http-could-not-register-url/

    may help you.

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

Sidebar

Related Questions

We are currently working on an application that will use a WCF service. The
Currently I am working on an Android application that is dynamically creating controls. Everytime
Am currently working on an application that requires users to submit posts and comments
I'm currently working in an application that has to navigate a webpage and recollect
I am currently working on an application that has different permissions/users for the local
I'm currently working on an application that allows people to schedule Shows for an
I am currently working on an application that allows reverse geocoding using silverlight +
The application that I'm currently working on has a funky set up for the
I am currently working on creating an application similar to the Contacts app on
I am working on symfony2 and currently creating an application with it, I can

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.