HTTP could not register URL https://+ . Another application has already registered this URL with HTTP.SYS

Have you come across this issue HTTP could not register URL https://+ . Another application has already registered this URL with HTTP.SYS

 

Are you self hosting a WCF library service inside a console or windows forms application? Then the most likely cause of this problem is that you have the library project contained within your same solution.

The problem happens because the WCF Service Host running at the same time as your custom host application. You run or debug your app and when your host initialises the WCF stack, you will see an AddressAlreadyInUseException as in the above pic. This is happening because the WCF Service Host in Visual studio is already listening on the same address...

Basically remove the wcf lib from the solution and reference it. When you run the host you should now be able to open it.

ServiceHost host = new ServiceHost(typeof(ClientHost));

Host.Open();

Now there should be no errorJ!

Rick Rainey's suggested a fix to the config file which doesn’t work for me, but may for somebody else which prevents removing it from the project. https://blogs.msdn.com/rickrain/archive/2008/02/14/Preventing-the-WCF-Service-Host-from-launching-in-Visual-Studio-2008.aspx

I have not seen if this bug exists in 2010 yet.. I will update when I check it..

Comments

  • Anonymous
    September 13, 2009
    Try disable the WCF Service Host for the library project. i.e. Right Click on the service library project and select Properties. Go to the WCF Options and uncheck the option Start WCF Service Host when debugging another project in the same solution

  • Anonymous
    October 08, 2010
    LKW. Thank you. Unchecking the option "Start WCF Service Host when debugging another project in the same solution", fixed the problem for me.

  • Anonymous
    November 29, 2010
    Thanks! I also unchecked the option "Start WCF Service Host when debugging another project..." and now it's all right.

  • Anonymous
    February 20, 2011
    Thank you for this information. It fixes the problem on VS2010.

  • Anonymous
    April 03, 2011
    LKW, thanks for the short solution. Keithmg, thanks for suggesting better way to orgnize WCF project

  • Anonymous
    February 26, 2012
    thanks

  • Anonymous
    March 08, 2012
    thanks, for the solution.....

  • Anonymous
    May 03, 2012
    Thanks! Unchecking the option "Start WCF Service Host when debugging another project..." worked for me.

  • Anonymous
    March 31, 2013
    Worked for me as well .. Thanks

  • Anonymous
    February 10, 2014
    Briliant! Appreciate that! Also worked! :)

  • Anonymous
    May 06, 2014
    Thanks LKW! Perfect simple fix that works.

  • Anonymous
    January 17, 2015
    LKW. Thank you. Unchecking the option "Start WCF Service Host when debugging another project in the same solution", fixed the problem for me.

  • Anonymous
    February 01, 2015
    Perfect! Thanks for help saving my time.

  • Anonymous
    February 11, 2015
    Thanks LKW! You are a savior!!! Worked like a CHARM!!

  • Anonymous
    February 17, 2015
    Thanks to LKW for the solution. Worked.

  • Anonymous
    August 18, 2015
    Take this page down. It's 6 years old!!!