gpt4 book ai didi

c# - 无法建立连接,因为连接到 Azure IP 时目标计算机主动拒绝

转载 作者:行者123 更新时间:2023-11-30 15:23:42 24 4
gpt4 key购买 nike

连接到 Azure Active Directory 服务时(请参阅下面的代码),我立即收到错误:

无法建立连接,因为目标机器主动拒绝191.235.135.139:443

通过 Google 搜索 IP,它解析到位于爱尔兰的 Azure 数据中心。虽然真正奇怪的是 IP 会不时发生变化,但昨天 Azure IP 191.235.195.38:443 工作没有任何问题?

public partial class Startup
{
public void ConfigureAuth(IAppBuilder app, HttpConfiguration config)
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
Audience = CloudConfigurationManager.GetSetting("AzureActiveDirectoryInstance"),
Tenant = CloudConfigurationManager.GetSetting("Tenant"),
Provider = new QueryStringOAuthBearerProvider("AUTHORIZATION")
});

app.UseWebApi(config);
}
}

我到处搜索答案,尝试了一系列建议,例如检查没有使用端口 443(它告诉我目标机器主动拒绝连接这一事实让我相信它能够到达机)。

我认为这可能与 Azure 防火墙有关,但我有其他同事能够连接到同一公共(public) IP 地址上的服务。

有人在尝试连接到 Azure 服务时遇到过这种情况吗?

最佳答案

花了更多时间研究这个问题后,看起来问题是因为我们的内部网络防火墙阻止了访问。

关于c# - 无法建立连接,因为连接到 Azure IP 时目标计算机主动拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34179824/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com