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

1

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Configure your server for remote connections

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

1 Comment

Yes, an essential step obviously. Could also be the firewall, depending on where the web site is running from.
0

Add the port (default 1433) to the connection string.

Ie: localhost\SQLSERVER2008,1433

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.