YAFLogo

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago
But then, aren't they all?

Here's what's happening: without making any changes to my setup, today my message board started throwing this error on every page:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]

   YAF.Web.Extensions.PageLinkExtensions.AddRoot(PageLinks pageLinks) +46

   YAF.Pages.forum.Page_Load(Object sender, EventArgs e) +342

   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52

   System.EventHandler.Invoke(Object sender, EventArgs e) +0

   System.Web.UI.Control.OnLoad(EventArgs e) +97

   System.Web.UI.Control.LoadRecursive() +61

   System.Web.UI.Control.LoadRecursive() +134

   System.Web.UI.Control.LoadRecursive() +134

   System.Web.UI.Control.LoadRecursive() +134

   System.Web.UI.Control.LoadRecursive() +134

   System.Web.UI.Control.LoadRecursive() +134

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693

It just throws it on the message board pages. I use the Sample Application and all of my own pages (which require the membership system) work fine, But here's the weird part. When I first go to my site, the Latest Discussions all show up as unread (picture 1.) If I refresh the page, suddenly they show up as unread (picture 2.)

What's going on?

UserPostedImage UserPostedImage

Sponsor
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago
Okay, and now this morning, without my having done anything, it's fine again. Any ideas what just happened?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago

Okay, and now this morning, without my having done anything, it's fine again. Any ideas what just happened?

Originally Posted by: eutychus 

No, did you upgraded yet to the latest version?

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago

No, did you upgraded yet to the latest version?

Originally Posted by: tha_watcha 

God knows I've tried. I've uploaded the 3.2.4 Sample Application up to a separate web server to see if it runs well before I try to install it on my main site, but every time I try to run it, it throws an error so I've given up on it for the time being.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago
Can you share the error?
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago

Can you share the error?

Originally Posted by: tha_watcha 

Could not load file or assembly 'System.Diagnostics.DiagnosticSource' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Stack Trace:

[FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] [FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +37 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +159 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +80 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22 System.Reflection.Assembly.Load(String assemblyString) +29 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +39 [ConfigurationErrorsException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +777 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +229 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +140 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +176 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +99 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +310 System.Web.Compilation.BuildManager.ExecutePreAppStart() +165 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +590 [HttpException (0x80004005): Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10090424 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago
For some reason the dll was missing i updated the Release with the missing dll

https://github.com/YAFNET/YAF.SampleWebApplication/archive/refs/tags/v3.2.4.zip 

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago

For some reason the dll was missing i updated the Release with the missing dll

https://github.com/YAFNET/YAF.SampleWebApplication/archive/refs/tags/v3.2.4.zip 

Originally Posted by: tha_watcha 

Now the error is:

Could not find a part of the path 'h:\root\home\***\install\mssql\upgrade\identity\upgrade.sql'.

This should be:

h:\root\home\***\forum\install\mssql\upgrade\identity\upgrade.sql

 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago

I updated the release again install path is correct now.

https://github.com/YAFNET/YAF.SampleWebApplication/archive/refs/tags/v3.2.4.zip 

Originally Posted by: tha_watcha 

Okay, I think we're making progress here! 😁

The stand-alone 3.2.4 seems to be showing up fine now. I just seem to have two issues (so far):

1: You can log in ... it will not allow you to log out.

2: On my forum menu, none of the drop down menus seem to be working.

And may I say also, thank you for your time and effort in getting to the bottom of things here. I know I seem like a PITA sometimes trying to get this to work, but your help and recommendations are very much appreciated.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago
The issues looks like a javascript problem. Did you get any javascript errors in the browser console?
eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago

The issues looks like a javascript problem. Did you get any javascript errors in the browser console?

Originally Posted by: tha_watcha 

Yes, and I can see the issue now. The error message states "Loading failed for the with source “http://mfoxweb-002-site3.ctempurl.com/forum/Scripts/forumExtensions.js?v=3”. But looking at the files, the only file is forumExtensions.min.js

Also, are you still using Stored Procedures in the database? I've noticed that almost all of my stored procedures are gone, but the board still works!

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago
If you compile the solution in debug mode yaf tries to use the unminified version of that js file, which is at the moment not included in the sample application. 

To resolve this ether compile on release mode or rename the file.

Also, are you still using Stored Procedures in the database? I've noticed that almost all of my stored procedures are gone, but the board still works!

Correct yaf doesn't use sp anymore.  With orm everything is generated via code. With this solution it works with sql databases such as sqlite.

eutychus
  • eutychus
  • 100% (Exalted)
  • YAF Lover Topic Starter
5 months ago
I renamed the file and that did the trick for the drop down menus., but it still won't allow me to log out. Clicking on Logout does send me back to the home page, but does not log me out.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 months ago

I renamed the file and that did the trick for the drop down menus., but it still won't allow me to log out. Clicking on Logout does send me back to the home page, but does not log me out.

Originally Posted by: eutychus 

Do you mean the top logout button inside the sample application, or the logout button from the yaf menu?