azuredotnetopenauthazure-web-app-service

"No OpenID endpoint found" on Azure Website


I have a strange issue with a MVC 3 app running as an Azure Website. I have had issues with Azure in the past, but the new Website concept works almost perfectly, except for this:

DotNetOpenAuth.Messaging.ProtocolException: No OpenID endpoint found.

This only happens with Google, only on Azure. Running locally it works fine, running on AppHarbor it works fine, but on Azure every attempt to use Google for OpenID login will result in a server error due to that exception (tracked using Airbrake).

See for yourself, try logging in with Google on my website and if you immediately get a server error page it means DNOA is throwing up. All other login methods work fine, including Yahoo and AOL which are also OpenID.

P.S.: Don't try it too many times though, AirBrake will happily spam my email address :<


Solution

  • Try adding this code to your web site before calling OpenIdRelyingParty.CreateRequest:

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
    

    In some Azure configurations this has been shown to resolve the issue.