Hi,
Got it sorted.
I dug a bit deeper into the error '500 (Internal Server Error) for the call to /API/Internalservices/controlbar/ToggleUserMode', and found this little nugget hidden in the middle of one of the errors in the network tab in one of the browsers :
"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Could not load file or assembly 'nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies.
I added the nunit.framework dll into the bin folder and it all now works.
Incase it helps anyone, here is the full exception message that led me (eventually) to it :
{"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","StackTrace":" at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n at System.Web.Http.Tracing.Tracers.HttpControllerActivatorTracer.<>c__DisplayClass2.<system.web.http.dispatcher.ihttpcontrolleractivator.create>b__0()\r\n at 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 at System.Web.Http.Tracing.Tracers.HttpControllerActivatorTracer.System.Web.Http.Dispatcher.IHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Tracing.Tracers.HttpControllerDescriptorTracer.<>c__DisplayClass2.b__0()\r\n at 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 at System.Web.Http.Tracing.Tracers.HttpControllerDescriptorTracer.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Exception has been thrown by the target of an invocation.","ExceptionType":"System.Reflection.TargetInvocationException","StackTrace":" at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)\r\n at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)\r\n at System.Activator.CreateInstance[T]()\r\n at DotNetNuke.Framework.ServiceLocator`2.InitInstance()\r\n at System.Lazy`1.CreateValue()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Lazy`1.get_Value()\r\n at DotNetNuke.Framework.ServiceLocator`2.get_Instance()\r\n at DotNetNuke.Web.InternalServices.ControlBarController..ctor()\r\n at lambda_method(Closure )\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"The type initializer for 'DotNetNuke.ExtensionPoints.ExtensionPointManager' threw an exception.","ExceptionType":"System.TypeInitializationException","StackTrace":" at DotNetNuke.ExtensionPoints.ExtensionPointManager..ctor()\r\n at DotNetNuke.Web.Components.Controllers.ControlBarController..ctor()",
"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Could not load file or assembly 'nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot find the file specified.","ExceptionType":"System.IO.FileNotFoundException","StackTrace":" at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)\r\n at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)\r\n at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)\r\n at 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 at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Int32 attributeCtorToken, Boolean mustBeInheritable)\r\n at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)\r\n at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)\r\n at Microsoft.Internal.AttributeServices.IsAttributeDefined[T](ICustomAttributeProvider attributeProvider)\r\n at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable()\r\n at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement origin)\r\n at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal()\r\n at System.ComponentModel.Composition.Hosting.TypeCatalog.GetEnumerator()\r\n at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetEnumerator()\r\n at System.Linq.EnumerableQuery`1.GetEnumerator()\r\n at System.Linq.EnumerableQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at DotNetNuke.ExtensionPoints.SafeDirectoryCatalog..ctor(String directory)\r\n at DotNetNuke.ExtensionPoints.ExtensionPointManager.InitializeMefCompositionContainer()\r\n at DotNetNuke.ExtensionPoints.ExtensionPointManager..cctor()"}}}}</system.web.http.dispatcher.ihttpcontrolleractivator.create>
|