0

I am having a WCF issue when trying to add service references in an application I am making. The URL that is being used is

http://+:8000/HelpDeskDataServices/CallDataService/because it conflicts with an existing registration on the machine.

I have checked netsh and there is nothing on 8000, and I have been trying to add that URL to netsh but do not think I am getting the syntax right (trying it this way):

 netsh http add urlacl url=http://+:8000/HelpDeskDataServices

I have three service references that are all going to be using the 8000 port if I can get it to work. Any suggestions?

Delete
  • 289
  • 1
  • 2
  • 19

1 Answers1

0

here is a piece of code from my project:

    // http://antscode.blogspot.com/2011/02/running-clickonce-application-as.html
    // http://msdn.microsoft.com/en-us/library/ms733768.aspx
    // http://stackoverflow.com/questions/2521950/wcf-selfhosted-service-installer-class-and-netsh
    var everyone = new SecurityIdentifier("S-1-1-0").Translate(typeof(NTAccount)).ToString();

    var args = string.Format("http add urlacl url=http://+:{0}/ user=\\{1}", port, everyone); 

    var pi = new ProcessStartInfo("netsh", args);
    pi.UseShellExecute = true;
    pi.CreateNoWindow = true;
    pi.WindowStyle = ProcessWindowStyle.Hidden;
    pi.Verb = "runas";
    var p = Process.Start(pi);

basically I register it for everyone - may be this will fix your issue?

or trailing slash? but most likely you already have something using this port. Try another port - and if there is no error that would mean you did not look for existing registration good enough...

Lexa87
  • 67
  • 1
  • 4