•  netghost
  • 80.6% (Honored)
  • YAF Lover Topic Starter
<add name="holder" connectionString="Data Source=(local);Initial Catalog=database_;User ID=database_user;Password=database_password"/>

i get the following error whenever i use the connection string above ...i am trying to install the new yaf

Failed to connect:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

i am hosting my site with mochahost
In yaf's main web.config, you have to specify which 'connection' you are using in db.config.

So if your connection name is "holder" as shown above, then in the web.config, you have to find all instances of the original YAF connection Name and update those to match your name used in db.config.

Additionally, if you are sending username and password, you sometimes have to tell the SQL connection that it is not a Trusted Connection - trusted connections use Windows Authentication to connect to the database, which won't work in this context because the 'windows user' running the site will most likely not be the windows user operating the database.
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Chetan Bavarva
If you have the *.mdf placed in App_Data folder, using this format works:

  <add name="ConnectionName"  connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|DatabaseName.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />

Chetan Patel
Custom software company India 
iFour Technolab Pvt. Ltd

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