Error after installing nopcommer 4.5 on IIS

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 年 前
The solution was installed successfully and database created and then it said restarting but now I am getting error:



And in Event Viewer I can see this:  (took me hours to get it running and now this )

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 1
SpanId: 95fab0e6287a00a8
TraceId: 07a9c895a1f6e3723de69f6a2823b6bf
ParentId: 0000000000000000
RequestId: 8000000c-0005-ff00-b63f-84710c7967bb
RequestPath: /

An unhandled exception has occurred while executing the request.

Exception:
System.InvalidOperationException: Nullable object must have a value.
   at Nop.Web.Factories.CatalogModelFactory.PrepareCategorySimpleModelsAsync(Int32 rootCategoryId, Boolean loadSubCategories)
   at Nop.Web.Factories.CatalogModelFactory.PrepareCategorySimpleModelsAsync(Int32 rootCategoryId, Boolean loadSubCategories) in E:\Websites\Carparts247\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 1660
   at Nop.Web.Factories.CatalogModelFactory.<PrepareCategorySimpleModelsAsync>b__53_0() in E:\Websites\Carparts247\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 1607
   at Nop.Core.Caching.MemoryCacheManager.GetAsync[T](CacheKey key, Func`1 acquire) in E:\Websites\Carparts247\src\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 129
   at Nop.Web.Factories.CatalogModelFactory.PrepareCategorySimpleModelsAsync() in E:\Websites\Carparts247\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 1607
   at Nop.Web.Factories.CatalogModelFactory.PrepareTopMenuModelAsync() in E:\Websites\Carparts247\src\Presentation\Nop.Web\Factories\CatalogModelFactory.cs:line 864
   at Nop.Web.Components.TopMenuViewComponent.InvokeAsync(Nullable`1 productThumbPictureSize) in E:\Websites\Carparts247\src\Presentation\Nop.Web\Components\TopMenu.cs:line 19
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsyncCore(ObjectMethodExecutor executor, Object component, ViewComponentContext context)
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments)
   at AspNetCore._Views_Shared__Root.ExecuteAsync() in C:\inetpub\wwwroot\Views\Shared\_Root.cshtml:line 18
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
   at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Nop.Services.Authentication.AuthenticationMiddleware.InvokeAsync(HttpContext context) in E:\Websites\Carparts247\src\Libraries\Nop.Services\Authentication\AuthenticationMiddleware.cs:line 94
   at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 103
   at WebMarkupMin.AspNetCore6.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, Boolean useMinification, Boolean useCompression)
   at WebMarkupMin.AspNetCore6.WebMarkupMinMiddleware.ProcessAsync(HttpContext context, Boolean useMinification, Boolean useCompression)
   at WebMarkupMin.AspNetCore6.WebMarkupMinMiddlewareBase.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Nop.Services.Installation.InstallUrlMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in E:\Websites\Carparts247\src\Libraries\Nop.Services\Installation\InstallUrlMiddleware.cs:line 52
   at Nop.Services.Common.KeepAliveMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in E:\Websites\Carparts247\src\Libraries\Nop.Services\Common\KeepAliveMiddleware.cs:line 49
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
1 年 前
Check the Category Table for data consistency
Looks like one record has a Parent Category Id that does not exist or is deleted
1 年 前
Has been running fine locally for weeks so does not make sense.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.