I have Visual Studio 2008 and SQL Server 2008 Developer Edition installed on a Windows XP machine.
I get this error when trying to work on a test web application:
A network-related or instance-specific error while establishing a connection to SQL Server Occurred. The server was not found or was not accessible. Verify that the example name is correct and SQL Server is configured to allow remote connection. (Provider: SQL Network Interface, Error: 26 - Error specifying server / instance)
My ADO.NET connection string is:
Data source =. \ SQLEXPRESS; AttachDbFilename = | DataDirectory | \ TestDB.mdf; Integrated security = True; User Instance = True
SQL Server should be a complete install of not know how SQL Express database? Do I need to work on an "attached" database? Or do I need to configure something? I think this has worked for me (out-the-box) in the past.
Update:
I intend to use it as an Express DB, even if I have a fully developed example of 2008. Can not you do that? Do not move one of these "Express" databases when you try to use your subscription functionality?
Your SQL Server does not use the developer version "SQLExpress" as a server name / example - its Instead try to use your server name or (local)
In addition, your string is already inappropriate for the database attached. The string should look something like this:
ConnectionString = "data source = (local); initial catalog = YourDatabaseName; IntegratedSecurity = True"
Update: ASP.NET It will not take you towards a particular database. In fact, all the ASP.NET care about your string is completely and accurately the some charge of SQL Server Describes the paths and credentials to use. Have you thought about trying a more conventional connection string and then supported one item at a time (for example, after giving a name to the database file, you have been verified that the "normal" database connection is correct Running in the way)?
Comments
Post a Comment