asp.net - Azure AD token endpoint API call timing out when deployed to IIS - Stack Overflow

Tech Stack:ASP.NET Web page application.NET Framework 4.7Transitioning from Ping Federate to Azure AD

Tech Stack:

  • ASP.NET Web page application
  • .NET Framework 4.7
  • Transitioning from Ping Federate to Azure AD
  • Windows 2016 Server
  • Flow => OAuth 2.0 auth code grant

We have a PING Federate OpenId Connect solution working for single sign-on on the IIS server. When converting to Azure AD, the C# code works on the dev machine (localhost). But when deployed to IIS Server, the token request call times out after 2 minutes.

On the IIS, the authorization call works fine and returns the code successfully, but when the API call is made to get token, it times out.

  • Auth url = /{tenant}/oauth2/v2.0/authorize

  • Token url = /{tenant}/oauth2/v2.0/token

Code:

var client = new HttpClient();
var stringContent = new StringContent(this.ToString(), Encoding.UTF8, "application/x-www-form-urlencoded");
                
var response = client.PostAsync(tokenUri, stringContent).Result;
response.EnsureSuccessStatusCode();
string responseBody = response.Content.ReadAsStringAsync().Result;

Not sure if it needs additional IIS settings? Or firewall port opening?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744831261a4596095.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信