Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

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


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.
Posted
Updated 16-May-14 1:22am
v2

1 solution

Hi. Yes i had the same problem as u!..
Look on this Article. it's helped me!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900