YAFLogo

vnchopra
  • vnchopra
  • 66.8% (Friendly)
  • YAF Forumling Topic Starter
15 years ago
Hi!
I have been trying for quite some time now to solve my problem. I am unsure if there is a fault with my database or if there is something wrong with the code or my connection string. On my local system, the YAF website works perfectly.
This is the error that i get

Server Error in '/' Application.
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 106: this.Controls.AddAt( 0, _header );
Line 107:
Line 108: this.Controls.Add( forumControl );

Line 109:
Line 110: // add the footer control after the page...


Source File: D:\inetpub\pwnconclave\App_Code\YAF\Forum.cs Line: 108

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
YAF.Classes.Config.get_ConnectionString() in Config.cs:94
YAF.Classes.Data.YafDBConnManager.InitConnection() in DBAccess.cs:50
YAF.Classes.Data.YafDBConnManager..ctor() in DBAccess.cs:41
YAF.Classes.Base.ForumPage.InitDB() in ForumPage.cs:298
YAF.Classes.Base.ForumPage.ForumPage_Init(Object sender, EventArgs e) in ForumPage.cs:177
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +74
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.AddedControl(Control control, Int32 index) +221
System.Web.UI.ControlCollection.Add(Control child) +146
YAF.Forum.Forum_Load(Object sender, EventArgs e) in D:\inetpub\pwnconclave\App_Code\YAF\Forum.cs:108
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


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


I have no idea why it would be causing a null reference error, am i doing something wrong when it comes to uploading the website? I am using VS 2008 to do my editing and uploading through the VS 2008 ftp. The whole website builds successfully with no errors. You can check it out at www.pwnconclave.com
Can someone please help me?
Sponsor

test2005
15 years ago
I'd start by getting the "recommended" connection string settings from your ISP. In the mean time, post your string here, maybe we can spot something.

.....the man in black fled across the desert..........and the gunslinger followed.....
vnchopra
  • vnchopra
  • 66.8% (Friendly)
  • YAF Forumling Topic Starter
15 years ago
ok i will place the connection string here on my next post, i was wondering, does that particular line of code "Line 108: this.Controls.Add( forumControl );" call the database?
vnchopra
  • vnchopra
  • 66.8% (Friendly)
  • YAF Forumling Topic Starter
15 years ago
Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

That was taken off connectionstrings.com
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button