“No OpenID endpoint found” on Azure Website

回眸只為那壹抹淺笑 提交于 2020-01-09 11:11:23

问题


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 :<


回答1:


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. Please let us know if this resolves your issue as well.




回答2:


I had this function in global.asax:

AreaRegistration.RegisterAllAreas();

After removing this line, all works perfectly.

I've added some areas in my app, this function was added automatically by VS2012.



来源:https://stackoverflow.com/questions/10969426/no-openid-endpoint-found-on-azure-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!