2012-06-22 18 views
1

J'ai créé un formulaire et connecté à une base de données SQL Server. Les données saisies dans le formulaire entrent dans la base de données. Mais quand je télécharge le même formulaire dans le téléchargement, le formulaire est soumis le mais obtenir une erreur en disant. S'il vous plaît, aidez-moiSQL Server ne se connecte pas

Server Error in '/' Application. 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) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

Line 23:
Line 24: SqlConnection con = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=Accomdation;Integrated Security=True");

Line 25: con.Open();

Répondre