我在升级2sxc超过12.8.0时遇到了问题。我试过13.12和14.7.4,但我也有同样的问题。模块安装似乎运行良好,但当我使用2sxc访问页面时,没有任何负载。它在页面上显示了这一点:“view.ascx中有些地方出了问题--检查错误日志”。当尝试向页面添加新实例时,它也会执行相同的操作。我甚至到不了行政屏幕。
下面是日志中的三个单独的条目,在我进入带有模块的页面之后。
DNN的版本为9.10.2。有什么好主意吗?我试着在一个干净的DNN安装上安装14.7.4,它工作得很好。只是有一个问题,升级网站,已经有它和设置。
08/02/2022 14:15:15
Module Load Exception
host
ModuleId 433 ModuleDefId 145 FriendlyName Dr M.D ModuleCo
ModuleId:433
ModuleDefId:145
FriendlyName:Dr., M.D.
ModuleControlSource:DesktopModules/ToSIC_SexyContent/View.ascx
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:7fcb6220-9d93-4aac-8782-df02a479f8b9
AssemblyVersion:9.10.2
PortalId:0
UserId:1
TabId:80
RawUrl:/About-Us/Our-Providers
Referrer:
UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
ExceptionHash:V4m6VzNZQyS8zghxe5zRifvuIuk=
Message:Unable to resolve service for type 'ToSic.Eav.DI.Generator`1[ToSic.Sxc.Context.IModule]' while attempting to activate 'ToSic.Sxc.Dnn.DnnModuleAndBlockBuilder'.
StackTrace:
InnerMessage:Unable to resolve service for type 'ToSic.Eav.DI.Generator`1[ToSic.Sxc.Context.IModule]' while attempting to activate 'ToSic.Sxc.Dnn.DnnModuleAndBlockBuilder'.
InnerStackTrace:
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at ToSic.Eav.DI.IServiceProviderExtensions.Build[T](IServiceProvider serviceProvider) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\DI\IServiceProviderExtensions.cs:line 11
at ToSic.Sxc.Dnn.View.<get_Block>b__5_1() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Eav.Logging.LogCallBaseExtensions.DoInTimer[TResult](LogCallBase logCall, Func`1 action) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Logging\Call\LogCallBaseExtensions.cs:line 40
at ToSic.Sxc.Dnn.View.<get_Block>b__5_0() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Eav.Plumbing.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Plumbing\GetOnce.cs:line 28
at ToSic.Sxc.Dnn.View.get_Block() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Sxc.Dnn.View.<>c__DisplayClass13_0.<Page_Load>b__1() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 80
at ToSic.Sxc.Dnn.View.TryCatchAndLogToDnn(Action action, LogCall timerWrap) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.Errors.cs:line 22
Source:
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:08/02/2022 14:17:45
General Exception
host
AbsoluteURL /Default.aspx DefaultDataProvider DotNetNuke.Data.SqlDataProvi
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:96a99285-dff1-4dad-bca7-3eaf2838d54c
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:C8Q6+tkICxVB34qGPv1GKvrEviE=
Message:Unable to resolve service for type 'ToSic.Eav.DI.Generator`1[ToSic.Sxc.Context.IModule]' while attempting to activate 'ToSic.Sxc.Dnn.DnnModuleAndBlockBuilder'.
StackTrace:
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at ToSic.Eav.DI.IServiceProviderExtensions.Build[T](IServiceProvider serviceProvider) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\DI\IServiceProviderExtensions.cs:line 11
at ToSic.Sxc.Dnn.View.<get_Block>b__5_1() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Eav.Logging.LogCallBaseExtensions.DoInTimer[TResult](LogCallBase logCall, Func`1 action) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Logging\Call\LogCallBaseExtensions.cs:line 40
at ToSic.Sxc.Dnn.View.<get_Block>b__5_0() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Eav.Plumbing.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Plumbing\GetOnce.cs:line 28
at ToSic.Sxc.Dnn.View.get_Block() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 32
at ToSic.Sxc.Dnn.View.InitModuleActions() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.menu.cs:line 42
at ToSic.Sxc.Dnn.View.get_ModuleActions() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.menu.cs:line 30
InnerMessage:
InnerStackTrace:
Source:Microsoft.Extensions.DependencyInjection
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:08/02/2022 14:17:45
Module Load Exception
host
ModuleId 433 ModuleDefId 145 FriendlyName Dr M.D ModuleCo
ModuleId:433
ModuleDefId:145
FriendlyName:Dr., M.D.
ModuleControlSource:DesktopModules/ToSIC_SexyContent/View.ascx
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:1fcebf18-e0a3-439a-b6be-f062eb73a8bd
AssemblyVersion:9.10.2
PortalId:0
UserId:1
TabId:80
RawUrl:/About-Us/Our-Providers
Referrer:https://cozadclinic.com/DesktopModules/admin/Dnn.PersonaBar/index.html?cdv=403
UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
ExceptionHash:JuER+Ungs3fHFrguNfZECs7N5+8=
Message:Error - can't find 2sxc instance configuration. Probably trying to show an app or content that has been deleted. Or you may have EnterpriseCMS features enabled but are missing the license activation.
StackTrace:
InnerMessage:Error - can't find 2sxc instance configuration. Probably trying to show an app or content that has been deleted. Or you may have EnterpriseCMS features enabled but are missing the license activation.
InnerStackTrace:
at ToSic.Sxc.Dnn.Install.DnnReadyCheckTurbo.EnsureSiteAndAppFoldersAreReadyInternal(IBlock block, Lazy`1 appFolderInitializerLazy) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn.Core\Dnn\Install\DnnReadyCheckTurbo.cs:line 54
at ToSic.Sxc.Dnn.Install.DnnReadyCheckTurbo.EnsureSiteAndAppFoldersAreReady(PortalModuleBase module, IBlock block, Lazy`1 appFolderInitializerLazy, ILog log) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn.Core\Dnn\Install\DnnReadyCheckTurbo.cs:line 34
at ToSic.Sxc.Dnn.View.<>c__DisplayClass13_0.<Page_Load>b__1() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 80
at ToSic.Sxc.Dnn.View.TryCatchAndLogToDnn(Action action, LogCall timerWrap) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.Errors.cs:line 22
Source:
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:这是我在升级工厂应用程序之后升级2sxc时遇到的新错误。整个网站都出现了这个错误--这个错误就是它显示的全部错误。
Server Error in '/' Application.
The DI Container is not available yet.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: The DI Container is not available yet.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: The DI Container is not available yet.]
DnnSharp.Common2.IoC.GlobalContainer.get_RootProvider() +57
DnnSharp.DnnApiEndpoint.Core.<>c.<.ctor>b__27_4() +9
System.Lazy`1.CreateValue() +429
System.Lazy`1.LazyInitValue() +158
System.Lazy`1.get_Value() +79
DnnSharp.DnnApiEndpoint.Core.<>c__DisplayClass27_0.<.ctor>b__5(ApiMethod data, eLogLevel currentMinLevel) +94
DnnSharp.Common.Logging.TypedLogger`1.GetCurrentMinLevel(T data) +20
DnnSharp.Common.Logging.TypedLogger`1.Log(eLogLevel level, T data, Func`1 lazyMessage) +67
DnnSharp.Common.Logging.TypedLogger`1.Log(eLogLevel level, T data, String message) +95
DnnSharp.DnnApiEndpoint.Core.App.UpdateWebConfig() +31
DnnSharp.DnnApiEndpoint.Core.App..ctor() +1774
DnnSharp.DnnApiEndpoint.Core.App..cctor() +30
[TypeInitializationException: The type initializer for 'DnnSharp.DnnApiEndpoint.Core.App' threw an exception.]
DnnSharp.DnnApiEndpoint.Core.Rewrite.DnnApiEndpointRewriter.CheckConfigHeaders() +39
DnnSharp.DnnApiEndpoint.Core.Rewrite.DnnApiEndpointRewriter.Init(HttpApplication context) +40
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +522
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +219
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +304
[HttpException (0x80004005): The type initializer for 'DnnSharp.DnnApiEndpoint.Core.App' threw an exception.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +658
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0发布于 2022-08-09 16:21:24
这似乎是依赖注入的一个问题。
它说它不能创建一个ToSic.Eav.DI.Generator<ToSic.Sxc.Context.IModule>。
通过升级,我只能猜测这些可能的原因:
有多个版本的依赖项注入活动。
我建议你比较一下工作中的安装
确保手动复制所有与2sxc相关的all,检查任何与DI相关的重定向(通常类似于Microsoft.Extension... )的web.config
https://stackoverflow.com/questions/73212972
复制相似问题