views:

336

answers:

2

I can connect to my sql server 2008 developer server using this in a sample code project:

string connection = @"data source=.\SQLSERVER2008;Integrated Security=SSPI;Initial Catalog=RSINET.MVC";

When I try updating the web.config file like so, I get a sql exception:

 <add name="ApplicationServices" connectionString="data source=.\SQLSERVER2008;Integrated Security=SSPI;Initial Catalog=RSINET.MVC" providerName="System.Data.SqlClient"/>

The error that I get is this:

Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

I am using the .NET provider?

matt

A: 

Configure your server for remote connections

http://support.microsoft.com/kb/914277

Raj More
Yes, an essential step obviously. Could also be the firewall, depending on where the web site is running from.
Aaron Bertrand
A: 

Did you try using LOCALHOST\SQLSERVER2008 or 127.0.0.1\SQLSERVER2008 or \SQLSERVER2008? Also why is there a period in your database name? You will likely have to escape that (or preferably get rid of it by changing the name)... even if it doesn't solve this issue, it will cause others if you leave it that way.

Aaron Bertrand
It is for a named instance of SQL Server .\SQLSERVER2008Osql -E -S .\SQLSERVER2008 - Named instance installed on my pc.Osql -E - default instance installed