web-services - 调用 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。
可能的相关软件包:
- .Net 核心 - 2.2
- System.ServiceModel.... - 4.4.0
我目前一无所知。任何帮助,将不胜感激!
编辑:
更详细的例外:
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)
解决方案
我从 Windows 10 版本 1903 回滚到 1803,它突然又开始工作了。不是真正的解决方案,但它有效。仍然不知道出了什么问题。可能是一个错误?
推荐阅读
- wordpress - 条纹 Wordpress 发票
- cygwin - 我想在 Cygwin64 上构建 cgreen
- ios - UniversalLink 不适用于 iOS 14 设备,但在模拟器上运行良好
- angular - 为什么 agular 材料排序显示箭头但不对列进行排序?
- android - 谷歌登录按钮定制设计android
- python - Python:尝试访问日期时间对象中的小时、分钟、秒
- python - “RuntimeError: No surface found at the given iso value” 将 3d numpy 数组转换为网格时出错
- python - 如何在烧瓶中使用后台线程?
- android - 在 Firebase Analytics 中,如何按应用版本名称过滤事件?
- python - 在 windows 上安装 python 安全更新