0

I have ASP.NET MVC web application running on server that is behind firewall. "Forms authenticate" is about to be replaced by Azure B2C. I used Microsoft's OWIN library.

I used following tutorial to get started with Azure B2C authentication.

Authentication is working locally on development machine, but when publishing to the server that is behind firewall, its timing out, when performing

public void SignIn()
{
        if (!Request.IsAuthenticated)
        {
            HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectAuthenticationDefaults.AuthenticationType);
        }
 }

Is this network problem? What needs to be done on network side to make it work? Open firewall on some ports or use proxy to connect to the outside world(Azure B2C)? Should it be in both directions?

Dzendo
  • 199
  • 3
  • 13

1 Answers1

0

It's doing an HTTP 302 redirect, so as long as you can connect to https://login.microsoftonline.com from there over port 443 (HTTPS), it should work.

juunas
  • 54,244
  • 13
  • 113
  • 149
  • I(as application user) am able to connect to https://login.microsoftonline.com, but server running web application cant connect. Before HTTP 302 redirect, something is going on, so server running application need to have ability to connect to Azure? – Dzendo Aug 21 '17 at 10:27
  • Hmm, well it does need to download the public keys used for token signing from Azure AD. Though I'd imagine that would cause errors on app startup. Other than that the challenge should only cause a redirect. – juunas Aug 21 '17 at 11:02