WCF Service with Windows Service

I am creating a WCF services library and I am checking that it works fine in the WCF testing client (by default). when I accept the WCF service in winodws service, I got an error. I use Windows XP, .Net 3.5 and Visual Studio 2008., and also to set the URL in the urlacl concept using HTTPCFG.exe, at the same time I got the same error as below.

Host Opening Error: HTTP was unable to register the URL "http: // +: 8731 / WCFServerDLL / Service1 /." Your process does not have access rights to this namespace (see "Http://go.microsoft.com/fwlink/?LinkId=70353" for details).

windows XP sp3.

Here I run "httpcfg.exe set urlacl / u http: // localhost: 8731 / WCFServerDLL / Service1 / / a" D: ... ""

We get the result

HttpSetServiceConfiguration completed with 0.

Set the url also in xp using httpcfg.but, I got the same error.

+3
source share
1 answer

You must add a WCF namespace exception. Use this command

netsh.exe http add urlacl url = http: // +: 8731 / user = {computer_name} \ {username}

Edit:

I'm sorry, netsh for Vista and 7, I just noticed that you are on XP. I am not so familiar with XP, but I believe the following will work. Be sure to replace myhost.

httpcfg.exe set urlacl / u http: // myhost: 8731 / / a

+4
source

Source: https://habr.com/ru/post/1781835/


All Articles