我花了很多时间尝试了所有可以在 Google 上找到但无法成功的方法。
但我无法从我的应用程序发送请求,如下所示:
var response = await (await httpClient.GetAsync($"requestString}")).Content.ReadAsStringAsync();
在这部分代码我有错误:
Unhandled exception rendering component: Resource temporarily unavailable System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace ---
最佳答案
关闭firewalld,然后重新启动docker。
sudo systemctl stop firewalld
sudo systemctl disable firewalld
关于c# - .net core docker centos HttpRequest错误: (Socket Exception) Resource temporarily unavailable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62459831/