Upgrading from 4.40.2 -> 4.40.3 "ERR_TOO_MANY_REDIRECTS"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 年 前
Change the property of the No.Core.Configuration.Hosting Config class
of
public bool UseHttpXForwardedProto { get; set; } = false;
to false
public bool UseHttpXForwardedProto { get; set; } = true;

if you are using a reverse proxy (nginx + SSL)
2 年 前
I had the same problem until I set the following value to 'True' in the database, dbo.Store -> SslEnabled
2 年 前
The instructions for installing Version 4.40.4 on Linux worked fine on Ubuntu 20.04 with MySQL. I could stop and start the nopCommerce440.service just fine. (I've also installed SSL and fail2ban.)

My 'custom' site's service would not start.

I had to modify Startup.cs as follows:

using Microsoft.AspNetCore.HttpOverrides;

And then (within DMF======)
        public void ConfigureServices(IServiceCollection services)
        {
            services.ConfigureApplicationServices(_configuration, _webHostEnvironment);

            //DMF=====================================================
            services.Configure<ForwardedHeadersOptions>(options =>
            {
                options.ForwardedHeaders =
                    ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
            });
            //DMF====================================================
        }

        /// <summary>
        /// Configure the application HTTP request pipeline
        /// </summary>
        /// <param name="application">Builder for configuring an application's request pipeline</param>
        public void Configure(IApplicationBuilder application)
        {
            application.ConfigureRequestPipeline();
            application.StartEngine();

            //DMF=================================================
            application.UseForwardedHeaders();
            //DMF===============================================
        }

After this change the service starts right up.
2 年 前
Where is the Startup.cs file?
Thanks
David4908 wrote:
The instructions for installing Version 4.40.4 on Linux worked fine on Ubuntu 20.04 with MySQL. I could stop and start the nopCommerce440.service just fine. (I've also installed SSL and fail2ban.)

My 'custom' site's service would not start.

I had to modify Startup.cs as follows:

using Microsoft.AspNetCore.HttpOverrides;

And then (within DMF======)
        public void ConfigureServices(IServiceCollection services)
        {
            services.ConfigureApplicationServices(_configuration, _webHostEnvironment);

            //DMF=====================================================
            services.Configure<ForwardedHeadersOptions>(options =>
            {
                options.ForwardedHeaders =
                    ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
            });
            //DMF====================================================
        }

        /// <summary>
        /// Configure the application HTTP request pipeline
        /// </summary>
        /// <param name="application">Builder for configuring an application's request pipeline</param>
        public void Configure(IApplicationBuilder application)
        {
            application.ConfigureRequestPipeline();
            application.StartEngine();

            //DMF=================================================
            application.UseForwardedHeaders();
            //DMF===============================================
        }

After this change the service starts right up.
2 年 前
In 4.40 source code, the file is located here:
\Presentation\Nop.Web\Startup.cs
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.