1

I have a problem similar to this one:

New Asp.Net MVC5 project produces an infinite loop to login page

(infinite loop when trying to get to the login view):

http://localhost:999/Login?returnUrl=%2FLogin%3FreturnUrl%3D%252FLogin%253FreturnUrl%253D%25252FLogin%25253FreturnUrl%25253D%2525252FLogin%2525253FreturnUrl%2525253D%252525252FLogin%252525253FreturnUrl%252525253D%25252525252FLogin%25252525253FreturnUrl%25252525253D%2525252525252FLogin%2525252525253FreturnUrl%2525252525253D%252525252525252FLogin%252525252525253FreturnUrl%252525252525253D%25252525252525252FLogin%25252525252525253FreturnUrl%25252525252525253D%2525252525252525252FLogin%2525252525252525253FreturnUrl%2525252525252525253D%252525252525252525252FLogin%252525252525252525253FreturnUrl%252525252525252525253D%25252525252525252525252FLogin%25252525252525252525253FreturnUrl%25252525252525252525253D%2525252525252525252525252FLogin%2525252525252525252525253FreturnUrl%2525252525252525252525253D%252525252525252525252525252FLogin%252525252525252525252525253FreturnUrl%252525252525252525252525253D%25252525252525252525252525252FLogin%25252525252525252525252525253FreturnUrl%25252525252525252525252525253D%2525252525252525252525252525252FLogin%2525252525252525252525252525253FreturnUrl%2525252525252525252525252525253D%252525252525252525252525252525252FLogin%252525252525252525252525252525253FreturnUrl%252525252525252525252525252525253D%25252525252525252525252525252525252FLogin%25252525252525252525252525252525253FreturnUrl%25252525252525252525252525252525253D%2525252525252525252525252525252525252FLogin%2525252525252525252525252525252525253FreturnUrl%2525252525252525252525252525252525253D%252525252525252525252525252525252525252FLogin%252525252525252525252525252525252525253FreturnUrl%252525252525252525252525252525252525253D%25252525252525252525252525252525252525252FLogin%25252525252525252525252525252525252525253FreturnUrl%25252525252525252525252525252525252525253D%2525252525252525252525252525252525252525252FLogin%2525252525252525252525252525252525252525253FreturnUrl%2525252525252525252525252525252525252525253D%252525252525252525252525252525252525252525252FLogin%252525252525252525252525252525252525252525253FreturnUrl%252525252525252525252525252525252525252525253

but it's the other way, the MVC3 app works great in debug mode in Visual Studio 2010(iis express), but not in local IIS.

There are actually 4 places the code is running or trying to run.

  1. Locally through iis express, works great
  2. in our AWS cloud web server in production, works great
  3. Locally through local IIS, does not work
  4. Staging server in the cloud, does not work

most info I've found suggest authentication settings, I've triple checked those.

feels like an IIS config issue, I took the web.config from the working PROD box and tried to using it on local iis and staging servers, no luck.

other info:

  1. we have a forgot password page that doesn't require authentication and it renders fine, no redirect issues (localhost:999/forgotpassword)

  2. if I go specifically to localhost:999/Login vs. localhost:999/, same result, infinite loop, my question is why doesn't the Login view work directly? seems like MVC routing issue, but then you have to ask why it works is debug mode and not in the other places, i.e. the routing is the same, it's in the Global.asax.cs file...

  3. I did a compare on the 3 config files in C:\Windows\System32\inetsrv\config\ comparing the prod server that works to the staging and local servers that don't, no luck.

  4. Ruled out data as local debug/iis express (works), local iis (doesn't work) and staging iis (doesn't work) are all pointing to same database (and cache server).

other ideas?

Community
  • 1
  • 1
AZ Chad
  • 1,616
  • 1
  • 15
  • 20

1 Answers1

0

turned out to be an application issue, required url in a database field, iis express vs. iis didn't matter, iis express was set up for localhost:60000 and iis was set up for localhost:999, 60000 was in database along with the prod URL, the staging and local 999 was not in the database and that's why those 2 platforms didn't work.

AZ Chad
  • 1,616
  • 1
  • 15
  • 20