Deployed with Azure, can't login error: page redirected too many times

1 year ago
1.  setup Azure App Service with .NetCore 3.1 LTS
2. use Visual Studio 2019 to publish the files
3. FTP over to Azure site\www.root
4. restart app service on azure
5. access the website, and click login
6.  got error as below:-
This page isn’t working site.azurewebsites.net redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

May I know what other settings to do to solve this?
Thanks.
1 year ago
Try editing your appSettings.json, and make the following change:
"UseHttpXForwardedProto": false
to
"UseHttpXForwardedProto": true
1 year ago
Did you try another browser, or\and clear cookies?
1 year ago
tried with "UseHttpXForwardedProto": true still the same

Did you try another browser, or\and clear cookies?
tried with incognito on chrome

In the end I just installed nopcommerce using Azure marketplace, but still have qusetions what folders or files that I need to exclude when I doing FTP Pushed over to Azure. Any Advice?
1 year ago
I have the same problem.
10 months ago
I have this same problem. Has anyone come up with a solution yet?
9 months ago
Try These Settings:
appSettings.json:
"UseHttpClusterHttps": true,
"UseHttpXForwardedProto": true,
"ForwardedHttpHeader": "X-FORWARDED-PROTO"

Seemed to do the trick for me
2 months ago
Kilali wrote:
Try These Settings:
appSettings.json:
"UseHttpClusterHttps": true,
"UseHttpXForwardedProto": true,
"ForwardedHttpHeader": "X-FORWARDED-PROTO"

Seemed to do the trick for me


Hi Kilali
I think your solution is very interesting. However, I can't get it work.
I still get "ERR_TOO_MANY_REDIRECTS".

Here is what I did:
- Create appsetttings.json in Presentation/Nop.Web folder.
- Put the following code to appsettings.json.


{
  "Hosting": {
    "UseHttpClusterHttps": true,
    "UseHttpXForwardedProto": true,
    "ForwardedHttpHeader": "X-FORWARDED-PROTO"
  }
}


I would be glad if someone can help figure it out this issue.
Thanks.
2 months ago
I have Tred with another approach still does not work.

- After deployment sucessfully, connect with FTP.
- Download appsettings.json in App_Data folder
- Edit HostingConfig properties to:
   
{
  "HostingConfig": {
    "UseHttpClusterHttps": true,
    "UseHttpXForwardedProto": true,
    "ForwardedHttpHeader": "X-FORWARDED-PROTO"
  }
}
  
- Upload it back to App_Data folder folder