使用https访问时,MVC 4 OAuth失败 [英] MVC 4 OAuth fails when accesing with https

查看:61
本文介绍了使用https访问时,MVC 4 OAuth失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在我的网站上实现了oauth登录,只要我使用http进入我的网站就可以正常生产,但不能使用https。



特此在ExternalLoginCallback方法上失败,在这一行

 AuthenticationResult result = OAuthWebSecurity.VerifyAuthentication(Url.Action(" ExternalLoginCallback",new {ReturnUrl = returnUrl})); 



我不是sur这是一个MVC特定的问题。身份验证工作与否之间的唯一区别是http / https协议。



我不知道这是否很重要,但该应用程序托管在Azure上的虚拟机上的IIS8,Windows Server 2012R2上。

解决方案

听起来你实际上并没有在你的代码中使用Live Connect,这是本论坛的主题。您可能想尝试在ASP.NET MVC论坛上发布问题:


http://forums.asp.net/1146.aspx/1?MVC


I implemented oauth login with facebook on my site and it works as normal on production as long as I enter my site using http, but not with https.

It's failing specifically on the ExternalLoginCallback method, on the this line

AuthenticationResult result = OAuthWebSecurity.VerifyAuthentication(Url.Action("ExternalLoginCallback", new { ReturnUrl = returnUrl }));

I'm not sure it's an MVC specific problem though. The only difference between the authentication working or not is the http/https protocol.

I don't know if this is important, but the app is hosted on IIS8, Windows Server 2012R2 on a virtual machine on Azure.

解决方案

It sounds like you're not actually using Live Connect in your code, which is the subject matter of this forum. You might want to try posting a question on the ASP.NET MVC forum:

http://forums.asp.net/1146.aspx/1?MVC


这篇关于使用https访问时,MVC 4 OAuth失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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