You have no items in your shopping cart.

Friday, December 27, 2024 12:09:38 AM

Can't install plugin - NullReferenceException in the method GetAuthenticatedCustomer

Posted: 4 years ago

#10238 Quote
I installed the nopCommerce 4.2 version of the Enhanced ECommerce plugin. My site goes offline and I get error starting the application. I can find no logs in nopCommerce or any reason why the site is taken offline. I see no issues in localhost so far. Is there a license key issue?

The code fails in this area twice. See attached.

src\Libraries\Nop.Services\Authentication\CookieAuthenticationService.cs > GetAuthenticatedCustomer


An error occurred while starting the application.
NullReferenceException: Object reference not set to an instance of an object.

Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions.AuthenticateAsync(HttpContext context, string scheme)

    NullReferenceException: Object reference not set to an instance of an object.
        Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions.AuthenticateAsync(HttpContext context, string scheme)
        Nop.Services.Authentication.CookieAuthenticationService.GetAuthenticatedCustomer() in CookieAuthenticationService.cs
        Nop.Web.Framework.WebWorkContext.get_CurrentCustomer() in WebWorkContext.cs
        Nop.Web.Framework.WebWorkContext.get_WorkingLanguage() in WebWorkContext.cs
        Nop.Services.Localization.LocalizationService.GetResource(string resourceKey) in LocalizationService.cs
        Nop.Services.Plugins.PluginService.InstallPlugins() in PluginService.cs
        Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IHostingEnvironment hostingEnvironment) in ServiceCollectionExtensions.cs
        Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
        Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
        Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
        Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

Posted: 4 years ago

#10239 Quote

Support

Posted: 4 years ago

#10239 Quote
Read this topic
https://www.nopcommerce.com/boards/topic/70453/plugin-uninstall-then-install-problem-in-nopcommerce-420

This man zrmax  solved this issue

Try to follow his recommendation and write me about result.

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved