YAFLogo

Ben Amada
  • Ben Amada
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
I was able to install YAF on localhost. I'm now trying to install it on a production server. I copied all the files to a sub-application (a directory off the main application -- the directory is marked as an application in IIS).

I was able to get to the /install/ page and complete the installation. All the DB tables and stored procedures have been created.

But I haven't yet been able to view the forum. When trying to pull up the forum, there is a NullReferenceException in the App_Code\YAF\Forum.cs file. Details below. In the yaf_EventLog table, I see the same error message everytime I try to pull up the forum.

Source: Failure Initializing User/Page.

Description: System.NullReferenceException: Object reference not set to an instance of an object. at YAF.Classes.Utils.YafContext.InitUserAndPage()

Type: 1

Any ideas are appreciated! Thanks.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 104: this.Controls.AddAt( 0, _header );

Line 105:

Line 106: this.Controls.Add( forumControl );

Line 107:

Line 108: // add the footer control after the page...

Source File: e:\Websites\xxx-xxx\forums\App_Code\YAF\Forum.cs Line: 106

Stack Trace:

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

YAF.Classes.Utils.YafContext.InitUserAndPage() +2587

YAF.Classes.Utils.YafContext.get_Page() +60

YAF.Classes.Utils.YafContext.get_IsSuspended() +46

YAF.Classes.Base.ForumPage.ForumPage_Init(Object sender, EventArgs e) +242

System.Web.UI.Control.OnInit(EventArgs e) +99

System.Web.UI.UserControl.OnInit(EventArgs e) +77

System.Web.UI.Control.InitRecursive(Control namingContainer) +333

System.Web.UI.Control.AddedControl(Control control, Int32 index) +198

System.Web.UI.ControlCollection.Add(Control child) +80

YAF.Forum.Forum_Load(Object sender, EventArgs e) in e:\Websites\xxx-xxx\forums\App_Code\YAF\Forum.cs:106

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

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

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

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

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

Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

Sponsor
Ben Amada
  • Ben Amada
  • 51.2% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
I got things working. The YAF application (sub-application in IIS) was inheriting settings from the parent application. In particular, it was inheriting the setting to turn Session State off ...

<pages enableSessionState="false">

I could've explicitly re-enabled session state in the YAF web.config file, but instead modified the parent app's web.config by wrapping the section in a location tag telling it to not inherit the settings into child applications.

<location path="." inheritInChildApplications="false">
     <system.web>
	 
     </system.web>
</location>

The forums are finally coming up and everything seems to be working!

mddubs
  • mddubs
  • 100% (Exalted)
  • YAF Developer
15 years ago

I got things working. The YAF application (sub-application in IIS) was inheriting settings from the parent application.

Ben Amada wrote:

Thanks for the followup, maybe it will help someone else.


UserPostedImage 

www.bunkerhollow.com  | www.careercomputing.com 

When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )