DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

ToggleUserMode error

Sort:
You are not authorized to post a reply.





New Around Here





    Hi,

    I've got a (big) problem with Edit Pencil to add module at one page: using F12 function, I see that ToggleUserMode return 500 error code. This is the error

    {Message: "An error has occurred.",…}
    ExceptionMessage: "An error occurred when trying to create a controller of type 'ControlBarController'. Make sure that the controller has a parameterless public constructor."
    ExceptionType: "System.InvalidOperationException"
    InnerException: {Message: "An error has occurred.",…}
    ExceptionMessage: "Eccezione generata dalla destinazione di una chiamata."
    ExceptionType: "System.Reflection.TargetInvocationException"
    InnerException: {Message: "An error has occurred.",…}
    ExceptionMessage: "L'inizializzatore di tipo di 'DotNetNuke.ExtensionPoints.ExtensionPointManager' ha generato un'eccezione."
    ExceptionType: "System.TypeInitializationException"
    InnerException: {Message: "An error has occurred.",…}
    ExceptionMessage: "Non è stato possibile caricare il file o l'assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' o una delle relative dipendenze. Impossibile trovare il file specificato."
    ExceptionType: "System.IO.FileNotFoundException"
    Message: "An error has occurred."
    StackTrace: "   in System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)\r\n   in System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)\r\n   in System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)\r\n   in System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)\r\n   in System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)\r\n   in System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)\r\n   in System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)\r\n   in Microsoft.Internal.AttributeServices.GetAttributes[T](ICustomAttributeProvider attributeProvider)\r\n   in Microsoft.Internal.AttributeServices.GetFirstAttribute[T](ICustomAttributeProvider attributeProvider)\r\n   in System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()\r\n   in System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetEnumerator()\r\n   in System.Linq.EnumerableQuery`1.GetEnumerator()\r\n   in System.Linq.EnumerableQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()\r\n   in System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   in System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   in DotNetNuke.ExtensionPoints.SafeDirectoryCatalog..ctor(String directory)\r\n   in DotNetNuke.ExtensionPoints.ExtensionPointManager.InitializeMefCompositionContainer()\r\n   in DotNetNuke.ExtensionPoints.ExtensionPointManager..cctor()"
    Message: "An error has occurred."
    StackTrace: "   in DotNetNuke.ExtensionPoints.ExtensionPointManager.ComposeParts(Object[] attributeParts)\r\n   in DotNetNuke.ExtensionPoints.ExtensionPointManager..ctor()\r\n   in DotNetNuke.Web.Components.Controllers.ControlBarController..ctor()"
    Message: "An error has occurred."
    StackTrace: "   in System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)\r\n   in System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n   in System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n   in System.Activator.CreateInstance[T]()\r\n   in DotNetNuke.Framework.ServiceLocator`2.InitInstance()\r\n   in System.Lazy`1.CreateValue()\r\n   in System.Lazy`1.LazyInitValue()\r\n   in System.Lazy`1.get_Value()\r\n   in DotNetNuke.Framework.ServiceLocator`2.get_Instance()\r\n   in DotNetNuke.Web.InternalServices.ControlBarController..ctor()\r\n--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCreateInstance(CreateInstanceCallSite createInstanceCallSite, ServiceProviderEngineScope scope)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.b__0(ServiceProviderEngineScope scope)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)\r\n   in Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)\r\n   in DotNetNuke.Web.Api.Internal.DnnDependencyResolver.GetService(Type serviceType)\r\n   in System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\r\n   in System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)"
    Message: "An error has occurred."
    StackTrace: "   in System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n   in System.Web.Http.Tracing.Tracers.HttpControllerActivatorTracer.<>c__DisplayClass2.b__0()\r\n   in System.Web.Http.Tracing.ITraceWriterExtensions.TraceBeginEnd(ITraceWriter traceWriter, HttpRequestMessage request, String category, TraceLevel level, String operatorName, String operationName, Action`1 beginTrace, Action execute, Action`1 endTrace, Action`1 errorTrace)\r\n   in System.Web.Http.Tracing.Tracers.HttpControllerActivatorTracer.System.Web.Http.Dispatcher.IHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n   in System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n   in System.Web.Http.Tracing.Tracers.HttpControllerDescriptorTracer.<>c__DisplayClass2.b__0()\r\n   in System.Web.Http.Tracing.ITraceWriterExtensions.TraceBeginEnd(ITraceWriter traceWriter, HttpRequestMessage request, String category, TraceLevel level, String operatorName, String operationName, Action`1 beginTrace, Action execute, Action`1 endTrace, Action`1 errorTrace)\r\n   in System.Web.Http.Tracing.Tracers.HttpControllerDescriptorTracer.CreateController(HttpRequestMessage request)\r\n   in System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"

    Now, I use DNN 9.9.0 (start from 9.1.1): I do update to try to resolve the problem but no success

    What can I check to solve the problem?

    Thanks






    Veteran Member





      Which version of DNN?
      Joe Craig
      DNN MVP
      Patapsco Research Group





      New Around Here





        Posted By Joe Craig on 07 May 2021 09:37 AM
        Which version of DNN?

        Hi Joe,

        actually I've got DNN 9.9.0

         

         






        New Around Here





          Introduction: in my VS solution (fully of .NET 4.8 project), I added a .NET Core 3.1 project to implement some web service

          At compile time, \bin contains a netcoreapp3.1: I remove the folder and the problem solved

          Why it happens? I would like understand the situation to avoid this error in future

          Thanks

          You are not authorized to post a reply.

          These Forums are dedicated to the discussion of DNN Platform.

          For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

          1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. English language posting only, please.

          Would you like to help us?

          Awesome! Simply post in the forums using the link below and we'll get you started.

          Get Involved