9 Replies - 541 Views - Last Post: 14 November 2019 - 01:01 PM

#1 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Problem logging into MVC site with Firefox only

Posted 12 October 2019 - 05:23 PM

This one has my really stumped. I've been developing an MVC site with out of the box authorization. I was using Firefox as my development browser and everything was going great. For no apparent reason the authorization piece just stopped working. It still works fine in Chrome and Edge though. I've tried common things like restarting the browser,clearing the cache, restarting Visual Studio, restarting the computer, etc. I haven't touched the login code. I don't know if this is a code or browser problem.

Is This A Good Question/Topic? 0
  • +

Replies To: Problem logging into MVC site with Firefox only

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15356
  • View blog
  • Posts: 61,553
  • Joined: 12-June 08

Re: Problem logging into MVC site with Firefox only

Posted 12 October 2019 - 05:36 PM

Any errors or messages in ff's f12 browser tools?

Any extensions or blocking software on?
Was This Post Helpful? 0
  • +
  • -

#3 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 12 October 2019 - 05:53 PM

Nothing unusual in the consoles. The session cookies seem to be being set correctly, comparing against other browsers. There's a weird behavior where the page isn't automatically redirecting. It is localized to this application. My other sites work fine.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15356
  • View blog
  • Posts: 61,553
  • Joined: 12-June 08

Re: Problem logging into MVC site with Firefox only

Posted 12 October 2019 - 06:10 PM

*shrug* It's hard to guess. Not enough information or too many things that could be wrong.

Does it do this on other machines?

Is the project set to 'iis local'?

Here's some optoins that worked in the past.
https://stackoverflo...ome-and-firefox
Was This Post Helpful? 1
  • +
  • -

#5 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 12 October 2019 - 06:56 PM

There are a lot of variables. I was hoping that I was missing something obvious. I did switch to use Local IIS instead of express with no luck. I'll flip it over to my other machine in the morning and see how it goes. I'll be happy if it's just this machine.

Thanks for the link. I looked at similar ones.
Was This Post Helpful? 0
  • +
  • -

#6 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 13 October 2019 - 06:20 AM

I opened the site in a private window and it worked fine. There's something weird going on with the session in normal Firefox. I guess the next step will be to login on both and compare the packets being sent and see if there's a difference. I might just do a reset and see if that resolves the issue.
Was This Post Helpful? 0
  • +
  • -

#7 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 13 October 2019 - 06:52 AM

I refreshed Firefox and the problem resolved itself. Some weird session artifact causing problems it seems. Thanks for reading.
Was This Post Helpful? 0
  • +
  • -

#8 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 09 November 2019 - 09:00 AM

The problem is back and in all browsers. I've narrowed it down to a black box call to Microsoft code, I tried rewriting the sign in piece but the code is never hit. The most applicable section of code is:

        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
        {
            if (!ModelState.IsValid)
            {
                return View(model);
            }

            // This doesn't count login failures towards account lockout
            // To enable password failures to trigger account lockout, change to shouldLockout: true
            var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
            switch (result)
            {
                case SignInStatus.Success:
                    return RedirectToLocal(returnUrl);
                case SignInStatus.LockedOut:
                    return View("Lockout");
                case SignInStatus.RequiresVerification:
                    return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
                case SignInStatus.Failure:
                default:
                    ModelState.AddModelError("", "Invalid login attempt.");
                    return View(model);
            
        }



The call to SignManager,PasswordSignInAsync always returns SignInStatus.Failure. Here is what I've tried

1) Multiple browsers
2) Clearing cache
3) Resetting browser
4) Local IIS instead of IIS Express
5) Rewriting the SignInManager and updating startup values to use the new manager
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15356
  • View blog
  • Posts: 61,553
  • Joined: 12-June 08

Re: Problem logging into MVC site with Firefox only

Posted 09 November 2019 - 12:49 PM

It's not making there at all? Is there an issue with the element triggering the POST to hitting that? Like not inside form tags, bad setup on routing?
Was This Post Helpful? 0
  • +
  • -

#10 LadyCynthia   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 105
  • Joined: 29-December 16

Re: Problem logging into MVC site with Firefox only

Posted 14 November 2019 - 01:01 PM

The new sign in manager was being ignored completely despite being the only registered sign in manager. Then as suddenly as it broke it started working again. I'm thinking there's something wrong with my laptop. It isn't the first strange thing to happen.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1