Hi All. I am warpped around the axle on this one. Installed the YAF as recommended in my existing application. Getting DB connection errors. My existing application uses a seperate App.Config file. I merged all the necessary chages to the existing applications web config and makes a reference to the App.Config file. I added the yafnet connection string key to the App.config file. Now Im getting the following error while loading up the forums.

Line 248: get
Line 249: {
Line 250:
Line 251: //return ConfigurationManager.ConnectionStrings["yafnet"].ConnectionString;
Line 252: }

[NullReferenceException: Object reference not set to an instance of an object.]
YAF.Classes.Config.get_ConnectionString() in C:\Yafsrc\YAF.Classes\YAF.Classes.Config\Config.cs:250
YAF.Classes.Data.YafDBConnManager.InitConnection() in C:\Yafsrc\YAF.Classes\YAF.Classes.Data\DBAccess.cs:75


<!-- file attribute used to load global settings -->
<appSettings file="../_private/PortalEngine.config">



<add key="YAF.BoardID" value="1" />
<add key="YAF.EnableURLRewriting" value="false" />
<add key="YAF.DatabaseObjectQualifier" value="yaf_" />
<add key="YAF.DatabaseOwner" value="dbo" />
<add key="YAF.ProviderExceptionXML" value="ProviderExceptions.xml" />
<add key="YAF.UploadDir" value="~/forum/upload/" />
<add key="YAF.ProviderKeyType" value="System.Guid" />
<add key="YAF.BaseUrl" value="~/Yaf/" />
<add key="YAF.Root" value="/Yaf/"/>
<add key="YAF.BaseUrlOverrideDomain" value="false" />
<add key="YAF.RadEditorSkin" value="Black" />
<add key="YAF.UseRadEditorToolsFile" value="true" />
<add key="YAF.RadEditorToolsFile" value="editors/radEditor/toolsFile.xml" />
<add key="YAF.ConfigPassword" value="yafconfig" />
<add key="yafnet" value="Server=*********;Database=yafnet;User ID=**;Password=*****;integrated security=SSPI" />

Does anyone know why Im getting this issue or I cant keep the connection string in the AppConfig file.

Any help would be greatly appreciated.

  •  Jaben
  • 100% (Exalted)
  • YAF Developer
This is not your app.config file. It's your db.config file.

Add the yafnet connection string where you are putting your connection strings.
Users browsing this topic

    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

    Project Twitter Updates

    Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved