YAFLogo

netghost
  • netghost
  • 80.6% (Honored)
  • YAF Lover Topic Starter
12 years ago

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

Sponsor
squirrel
12 years ago
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
8 years ago
If you have the *.mdf placed in App_Data folder, using this format works:


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

Chetan Patel

Custom software company India 

iFour Technolab Pvt. Ltd