“未找到 OpenID 端点"在 Azure 网站上 [英] "No OpenID endpoint found" on Azure Website

查看:46
本文介绍了“未找到 OpenID 端点"在 Azure 网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个作为 Azure 网站运行的 MVC 3 应用程序的奇怪问题.我过去曾遇到过 Azure 问题,但新的网站概念几乎完美无缺,除了这个:

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.

这仅在 Google 上发生,仅在 Azure 上发生.在本地运行它可以正常工作,在 AppHarbor 上运行它可以正常工作,但是在 Azure 上,每次尝试使用 Google 进行 OpenID 登录都会由于该异常(使用 Airbrake 跟踪)而导致服务器错误.

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).

亲眼看看,尝试在我的网站上使用 Google 登录,如果您立即看到服务器错误页面,则表示 DNOA 正在崩溃.所有其他登录方法都可以正常工作,包括同样是 OpenID 的 Yahoo 和 AOL.

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.:不过不要尝试太多次,AirBrake 会很乐意向我的电子邮件地址发送垃圾邮件:<

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

推荐答案

在调用 OpenIdRelyingParty.CreateRequest 之前尝试将此代码添加到您的网站:

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

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

在某些 Azure 配置中,这已被证明可以解决问题.

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

这篇关于“未找到 OpenID 端点"在 Azure 网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆