MVC5 Null Reference with facebook login

后端 未结 6 2411
臣服心动
臣服心动 2020-12-08 08:04

Im getting an null reference exception sometimes when I login with facebook using the out of the box ASP.NET mvc5 accounts controller.


6条回答
  •  失恋的感觉
    2020-12-08 08:42

    I had a facebook account that did not have a user name set that was giving me a null exception message on that line of code. It seems the problem here is that some properties are expected in the account when returning information back to your application, and if those properties aren't present, it bombs. In my case, setting the user name in facebook fixed the problem.

提交回复
热议问题