I'm trying to start a WCF as a Windows service, however it returns me the following error:
HTTP could not register the URL link . Your process does not have access rights to this namespace (see link for details).
How can I solve this problem, when it was a common executable, it worked perfectly, now as I'm putting it as a windows service, it keeps returning this error.
I'm doing this to start:
ServiceHost host = new WebServiceHost(typeof(Server));
WebHttpBinding binding = new WebHttpBinding();
binding.MaxReceivedMessageSize = 999999999;
ServiceEndpoint point = host.AddServiceEndpoint(typeof(IServer), binding, url);
point.Behaviors.Add(new WebHttpBehavior());
host.Open();
btnSalvar.Log(new string[1] { "CONECTADO" });
The problem is not the code, as I have already reported, it works in a common exe, the error happens after putting it as a windows service.