1

我能夠在本地服務結構集羣上成功運行我的asp.net核心Web應用程序一段時間在https://localhost:44384。 但現在我開始看到錯誤消息「'https://+:44384/'已經註冊」,我的應用程序將不會啓動瀏覽器窗口。 在我的本地機器上,我沒有將此端口44384用於任何其他應用程序。那麼,爲什麼我收到上述錯誤信息呢?即使我將端口更改爲其他號碼,我仍然收到提及smae端口錯誤消息「'https://+:44384/'已被註冊」的錯誤消息。Microsoft.Net.Http.Server.WebListenerException(0x80004005):前綴'https:// +:44384 /'已經註冊

任何建議來解決這個錯誤?

錯誤消息:

Microsoft.Net.Http.Server.WebListener: Information: Listening on prefix: https://+:44384/ Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix ' https://+:44384/ ' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start() Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix ' https://+:44384/ ' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start() Microsoft.Net.Http.Server.WebListener: Error: Start

Microsoft.Net.Http.Server.WebListenerException (0x80004005): The prefix ' https://+:44384/ ' is already registered. at Microsoft.Net.Http.Server.UrlGroup.RegisterPrefix(String uriPrefix, Int32 contextId) at Microsoft.Net.Http.Server.UrlPrefixCollection.RegisterAllPrefixes(UrlGroup urlGroup) at Microsoft.Net.Http.Server.WebListener.Start()

回答

3

我懷疑你正在運行一個五個節點集羣的發展。 (也許這是之前的1個節點集羣?)。如果是這樣,在將服務部署到這些節點時會遇到麻煩,因爲它們都使用相同的網絡堆棧。 解決方案:你的web應用程序的

部署1個實例 - 服務本地

when you run a web service locally, you need to ensure that only one instance of the service is running. Otherwise, you run into conflicts from multiple processes that are listening on the same path and port. As a result, the web service instance count should be set to "1" for local deployments.

more info here

and here

0

,你應該能夠使用該端口與看到的任何東西的PID:

netstat -a -n -o

相關問題