默认的Oath身份验证系统在VE2013 MVC项目中不起作用 [英] Default Oath authentication system doesn't work in VE2013 MVC project

查看:74
本文介绍了默认的Oath身份验证系统在VE2013 MVC项目中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试使用Visual Studio 2013和MVC模式开发Web应用程序。我希望我选择了一个好的论坛。



我想在我的网络应用宣誓认证系统上启用。我完全遵循 Microsoft的教程。不幸的是,尽管我在我的项目中没有其他任何东西,但是使用facebook进行身份验证不起作用。



应用程序在帐户控制器中为我提供未处理的异常操作ExternalLoginCallback。函数GetExternalLoginInfoAsync()返回null值。



Hi,

I'm trying to develop web app using Visual Studio 2013 and MVC pattern. I hope I've choosen good forum.

I want to enable on my web app oath authentication system. I followed EXCACTLY every step decribed in Microsoft's tutorial. Unfortunetly, despite I did NOTHING else in my project, authentication with facebook doesn't work.

Application give me unhandled exception in action ExternalLoginCallback in Account Controller. The function GetExternalLoginInfoAsync() returns null value.

public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
        {
            var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();





调用此方法时,returnUrl参数也为null。如果这是例外,我不会这样做。



我使用Fiddler应用程序来追踪浏览器中发生的事情。选择使用我的网站上的Facebook登录后,有Facebook的请求。然后facebook响应重定向到mydomain / signin-facebook?code =< some hash here>& state =< and here>#_ = _这表明一切正常在Facebook方面,问题发生在我的应用程序内。



我想跟踪它之后发生的事情,但我可以在调用signin-facebook动作(?)后找到执行的代码。



记录:我用谷歌搜索了这个问题。看起来有几个人有同样的问题,建议的解决方案是:



-reset IIS

-change App_Start / Startup.Auth中的FacebookAuthenticationOptions .cs文件
在调用GetExternalLoginInfoAsync()方法之前
-restart seesion

- 在ExternalLoginCallback中更改一些代码

-update references

- 在facebook帐户上填写用户字段



他们都没有帮助。



我'我试过几个Facebook帐户。我在不同的计算机上尝试过它,并在某些服务器上发布了页面。什么都没有改变。



我非常感谢这里的帮助,因为它是基本功能,我无法使用Microsoft解决方案开发任何Web应用程序而无需解决此问题。



While calling this method, returnUrl parameter is also null. I don't if this is excepted.

I used Fiddler application to track down what's happening in my browser. After choosing to log in using facebook on my website, there is request to facebook. Then facebook respons with redirection to mydomain/signin-facebook?code=<some hash here>&state=<and here>#_=_ That suggest everything works fine on facebook side and the problem occurs inside my app.

I would like to follow whats happening after it, but I could find what code is executed after calling "signin-facebook" action(?).

For the record: i've googled the issue. It looks like several people had the same problem, proposed solution were:

-reset IIS
-change FacebookAuthenticationOptions in App_Start/Startup.Auth.cs file
-restart seesion before calling GetExternalLoginInfoAsync() method
-some code changes in ExternalLoginCallback
-update references
-fill the user field on facebook account

None of them helped.

I've tried it with several facebook accounts. I've tried it on different computers and with page published on some server. Nothing changed.

I'd really appreciate help here, since it's basic funtion and I can't develop any web application using Microsoft solutions without solving this issue.

推荐答案

嗨。是的我和你有同样的问题!..

看看本文。它帮助了我!
Hi. Yes i had the same problem as u!..
Look on this Article. it's helped me!


这篇关于默认的Oath身份验证系统在VE2013 MVC项目中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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