YAFLogo

thx1200
  • thx1200
  • 63.2% (Friendly)
  • YAF Camper Topic Starter
a year ago
I was on DNN 9.4.4 and I'm upgrading gradually to 9.11.  Along the way, I'm upgrading to supported versions of YAF.  I am currently at DNN 9.9.1 and just installed YAF 2.31.15.  I was previously on 2.31.4.  At this point I am getting an error.  When you are not logged in to DNN, it's a blank page.  When you log in, it goes into a redirect loop.  Examining the DNN logs, I see this error over and over.  My plan is to go to the latest version of both DNN and YAF but I'm stuck at this point in the process.

ModuleControlSource:DesktopModules/YetAnotherForumDotNet/YafDnnModule.ascx

AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:0205fdb5-7b06-4001-a7e6-700cd10fa4eb

AssemblyVersion:9.9.1

PortalId:0

UserId:1

TabId:92

RawUrl:/Forums/def/ErrorMessage

Referrer:https://www2.avianwaves.com/Login_2d53386a84704d71b636ad88c224a028?returnurl=%2fForums

UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.54

ExceptionHash:5FbzOH3drk793LLxdennZnEjOCI=

Message:serviceLocator cannot be null Parameter name: serviceLocator

StackTrace:

InnerMessage:serviceLocator cannot be null Parameter name: serviceLocator

InnerStackTrace:

   at YAF.Types.CodeContracts.VerifyNotNull[T](T obj, String argumentName)
   at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IServiceLocator serviceLocator)
   at YAF.DotNetNuke.YafDnnModule.CreateOrUpdateUser()
   at YAF.DotNetNuke.YafDnnModule.DotNetNukeModuleLoad(Object sender, EventArgs e)
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
a year ago
I can not test this with such old version. But at least for yaf you can directly upgrade to the latest version. So upgrade first to the latest version of dnn, and upgrade yaf.
thx1200
  • thx1200
  • 63.2% (Friendly)
  • YAF Camper Topic Starter
a year ago
When I update all the way to DNN 9.11.1, DNN won't load.  I can't even run the upgrade script.  I get a bunch of errors from YAF.  And since I can't upgrade YAF before DNN, I'm stuck doing this staggered upgrade.

The error I get when going all the way to DNN 9.11.1 is this.

Server Error in '/' Application.
Could not load file or assembly 'System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.IO.FileLoadException: Could not load file or assembly 'System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Stack Trace:


[FileLoadException: Could not load file or assembly 'System.Web.Http, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
   System.Reflection.RuntimeAssembly.GetExportedTypes() +32
   YAF.Core.Extensions.<>c__DisplayClass0_0`1.<FindClassesWithAttribute>b__0(Assembly a) +23
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +78
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +526
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +73
   YAF.Types.Extensions.EnumerableExtensions.ForEach(IEnumerable`1 list, Action`1 action) +166
   YAF.Core.Extensions.AssemblyExtensions.FindClassesWithAttribute(IEnumerable`1 assemblies) +300
   YAF.Core.Modules.DynamicServicesModule.RegisterDynamicServices(ContainerBuilder builder, Assembly assemblies) +110
   YAF.Core.Modules.DynamicServicesModule.Load(ContainerBuilder containerBuilder) +30
   Autofac.Module.Configure(IComponentRegistryBuilder componentRegistry) +84
   Autofac.ContainerBuilder.Build(IComponentRegistryBuilder componentRegistry, Boolean excludeDefaultModules) +152
   Autofac.Module.Configure(IComponentRegistryBuilder componentRegistry) +95
   Autofac.ContainerBuilder.Build(IComponentRegistryBuilder componentRegistry, Boolean excludeDefaultModules) +152
   Autofac.ContainerBuilder.Build(ContainerBuildOptions options) +148
   YAF.Core.GlobalContainer..cctor() +29

[TypeInitializationException: The type initializer for 'YAF.Core.GlobalContainer' threw an exception.]
   YAF.Core.TaskModule.Init(HttpApplication httpApplication) +167
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo handlers) +587
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347

[HttpException (0x80004005): The type initializer for 'YAF.Core.GlobalContainer' threw an exception.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0 

 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
a year ago
And when you try to upgrade to dnn 9.11.1 the yaf version is still 2.31.4 correct?

try to modify the web.config to use the old dll in the assembly binding section

<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="5.2.3.0" /> </dependentAssembly>
thx1200
  • thx1200
  • 63.2% (Friendly)
  • YAF Camper Topic Starter
a year ago
Thanks, that got DNN to load now.  I had some errors upgrading, but they are errors in DNN modules, so I will troubleshoot my way through those and let you know if I can get YAF fully updated.