简体   繁体   中英

OAuth not working after deploying to Azure [ASP.NET MVC]

I'm trying to integrate OAuth in my Web App . It's working fine when testing it through localhost. But after publishing to Azure its not working. Getting Http 500 error for http://shibpurconnect.azurewebsites.net/Account/ExternalLoginCallback

I have already updated all the redirect urls in Google, Facebok. Please see attached screenshot - 在此输入图像描述在此输入图像描述

Looks like I'm missing some configuration, but not sure what.

Thanks for looking into it and appreciate your help.

500 is internal server error. So something went wrong in the function ExternalLoginCallback when it was executed on the server. What I do is create a simple error Controller, then I could put a try / catch around the code in AccountController.cs -> ExternalLoginCallback and redirect to ErrorController from inside the catch. after I log & display the error from the ErrorController.

I integrated Elmah and able to get the actual reason. It was due to login failure to database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM