簡體   English   中英

使用Windows服務的WCF服務

[英]WCF Service with Windows Service

我創建WCF服務庫,我測試在WCF測試客戶端上工作正常(默認)。 當我在winodws服務中托管WCF服務時,我得到了錯誤。 我正在使用Windows XP,.Net 3.5和Visual Studio 2008.並且還使用HTTPCFG.exe將URL設置為urlacl概念,那時我也得到了相同的錯誤,如下所示。

打開主機時出錯:HTTP無法注冊URL“http:// +:8731 / WCFServerDLL / Service1 /。” 您的進程沒有此命名空間的訪問權限(有關詳細信息,請參閱“http://go.microsoft.com/fwlink/?LinkId=70353”)。

Windows XP SP3。

在這里我運行“httpcfg.exe set urlacl / u http:// localhost:8731 / WCFServerDLL / Service1 / / a”D:...“”

我得到了結果

HttpSetServiceConfiguration用0完成。

使用httpcfg也在xp中設置URL。但是我得到了同樣的錯誤。

您必須添加WCF命名空間異常。 使用此命令

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

編輯:

對不起,netsh適用於Vista和7,我只是注意到你在使用XP。 我不熟悉XP,但我相信以下內容會起作用。 確保替換myhost。

httpcfg.exe設置urlacl / u http:// myhost:8731 //一個

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM