1. I have downloaded the sample Telerik Sales Dashboard demo site.
2. I have SQL Server 2008 installed and have the NorthWind database installed also.
3. When I try to launch the web site using VS2010, I keep getting the error:
static public IObjectScope GetNewObjectScope()
{
Database db = Database(); <-- Error happens here
IObjectScope newScope = db.GetObjectScope();
return newScope;
}
Unable to reach database server on host ''.
Error Details: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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).
I have tried all of the following connection strings in my web.config (one by one) file but none of them work:
<add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Data Source=MYCOMPUTERNAME;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Server=MYCOMPUTERNAME; Database=Northwind.mdf; Integrated Security=true;" providerName="System.Data.SqlClient" />
What is going wrong here? What is the correct connection string to use for SQL Server 2008?
2. I have SQL Server 2008 installed and have the NorthWind database installed also.
3. When I try to launch the web site using VS2010, I keep getting the error:
static public IObjectScope GetNewObjectScope()
{
Database db = Database(); <-- Error happens here
IObjectScope newScope = db.GetObjectScope();
return newScope;
}
Unable to reach database server on host ''.
Error Details: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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified).
I have tried all of the following connection strings in my web.config (one by one) file but none of them work:
<add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Data Source=.\MYCOMPUTERNAME;AttachDbFilename=|DataDirectory|\Northwind.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Data Source=MYCOMPUTERNAME;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="NorthwindConnectionString" connectionString="Server=MYCOMPUTERNAME; Database=Northwind.mdf; Integrated Security=true;" providerName="System.Data.SqlClient" />
What is going wrong here? What is the correct connection string to use for SQL Server 2008?