WCF/WF - WCF Service Host in Windows Service - Asked By siva on 27-Dec-10 08:04 AM

I create WCF service library and i test that working fine on WCF Test client(default). when i host the WCF service in winodws service that time i got the error. I am using windows XP sp3, .Net 3.5 and Visual Studio 2008. i got error.

Error opening host : HTTP could not register 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).

the above link for microsoft i implement the httpcfg.
Here i run the "httpcfg.exe set urlacl /u http://localhost:8000/WCFServerDLL/Service1/ /a"

i get the result

HttpSetServiceConfiguration completed with 0.
what is the problem i got same error. can you give me a suggation.

Venkat K replied to siva on 27-Dec-10 09:23 AM
Use the httpcfg.exe set urlacl command to change namespace reservations,
Check this link on how to proceed:

siva replied to Venkat K on 28-Dec-10 03:09 AM
hi venkat,
 I tryed above you see that i get the result
"HttpSetServiceConfiguration completed with 0."
and also to check the "httpcfg query urlacl" the url is present, but again the same error i get it.
I give my App.config file here

<?xml version="1.0" encoding="utf-8" ?>



<compilation debug="true" />




<source name="System.ServiceModel.MessageLogging">


<add name="messages"


initializeData="c:\logs\messages.svclog" />





<!-- When deploying the service library project, the content of the config file must be added to the host's

app.config file. System.Configuration does not support config files for libraries. -->



<service name="WCFServerDLL.Service1" behaviorConfiguration="WCFServerDLL.Service1Behavior">



<add baseAddress="http://localhost:8731/WCFServerDLL/Service1/" />



<endpoint address="mex" binding="mexHttpBinding" name="MexHttp"

contract="IMetadataExchange" />

<endpoint address=""

binding="wsDualHttpBinding" contract="WCFServerDLL.IService1" />





<behavior name="WCFServerDLL.Service1Behavior">

<!-- To avoid disclosing metadata information,

set the value below to false and remove the metadata endpoint above before deployment -->

<serviceMetadata httpGetEnabled="True"/>

<!-- To receive exception details in faults for debugging purposes,

set the value below to true. Set to false before deployment

to avoid disclosing exception information -->

<serviceDebug includeExceptionDetailInFaults="False" />















Greg replied to siva on 19-Jan-11 03:25 PM
Are you intending to use localhost, or your computers actual network address?