首页 > 解决方案 > 调用 Web 服务时出现 WinHttpException

问题描述

我试图在本地调用代码中的任何 WCF 服务,这给了我以下异常: WinHttpException: The group or resource is not in the correct state to perform the requested operation.

一些代码示例:await service.ReadMultipleAsync(filters.ToArray(), null, 1);. 不过这可能没什么好说的。奇怪的是它在更新 Windows 10 之前就可以工作。这可能是巧合,但我绝对没有代码更改。

我也可以通过一些工具直接与 WFC 服务对话,所以它不可能是某种 IP 阻塞或防火墙。但是通过代码执行此操作会导致错误,无论是使用 Kerstel 还是 IIS Express。

可能的相关软件包:

我目前一无所知。任何帮助,将不胜感激!

编辑:

更详细的例外:

System.Net.Http.WinHttpException (8007139F, 5023): The group or resource is not in the correct state to perform the requested operation
   at System.Threading.Tasks.RendezvousAwaitable`1.GetResult()
   at System.Net.Http.WinHttpHandler.StartRequest(WinHttpRequestState state)

标签: web-serviceswcf.net-corewindows-10

解决方案


我从 Windows 10 版本 1903 回滚到 1803,它突然又开始工作了。不是真正的解决方案,但它有效。仍然不知道出了什么问题。可能是一个错误?


推荐阅读