我面對我的地方(發展)服務織物實例以下錯誤消息:服務織物0x80004005的訪問被拒絕打開了端口HttpListener
2016-09-20 12:56:16.5008 WARN 7 Metrics.Visualization.MetricsHttpListener Unable to start HTTP Listener. Sleeping for 1 sec and retrying 2 more times System.Net.HttpListenerException (0x80004005): Access is denied
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Metrics.Visualization.MetricsHttpListener.Start() in C:\Work\Metrics.NET\Src\Metrics\Visualization\MetricsHttpListener.cs:line 97
at Metrics.Visualization.MetricsHttpListener.<>c__DisplayClass15_0.<<StartHttpListenerAsync>b__0>d.MoveNext() in C:\Work\Metrics.NET\Src\Metrics\Visualization\MetricsHttpListener.cs:line 62
Metrics.Net試圖打開一個端口。顯然這失敗了。我想知道如何解決這個問題。
要我ServiceManifest.xml添加以下行:
<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="MyApplicationTypeEndpoint" Protocol="http" Port="20002" />
</Endpoints>
</Resources>
端口是正確的。
還有什麼我應該照顧的?
(同樣在一個側面說明 - 我怎麼能打開端口範圍,而不是單一的端口?)