0

I've developed a deployed a small ASP.Net MVC web application into an Azure App Service application.

The application is using Google third party login provider for authenticating users.

Periodically, the login functionality stops working, the user clicks the Google button to login, the page reloads and they are not logged in. There's seemingly no error generated (I've connected ELMAH and nothing is logged).

If I restart the App Service application in Azure, the login starts working again for a period of time.

I've also connected the remote debugger to the app from Visual Studio and the act of doing this seems to cause the logins to being working again, so I'm stumped as to how to troubleshoot this issue further.

Does anyone have any experience or thoughts about what this could be please?

Thanks very much!

MartynJones87
  • 457
  • 5
  • 21
  • 1
    If the login functionality stops working, please use a browser development tool or Fiddler to catch the http traffics. The normal web requests flow should be like this, 1. yourwebapp: /Account/ExternalLogin -> 2. accounts.google.com/o/oauth2/auth -> 3. yourweb app: /signin-google -> 4. accounts.google.com/o/oauth2/token -> 5. yourweb app: /Account/ExternalLoginCallback. Please compare and post the differences for further discussion. – Amor Jul 21 '17 at 06:13
  • Thank you @Amor. Having managed to replicate the error and catch it with Fiddler, I found that in the ExternalLoginCallback action, the GetExternalLoginInfoAsync() method was returning null, causing the redirect back to the login view. Having narrowed it down to that, managed to find a solution to the underyling issue here: https://stackoverflow.com/a/36903338/403424 Have deployed that and hopefully that will fix it permanently. Thank you again @Amor!! – MartynJones87 Aug 08 '17 at 16:54

0 Answers0