내 데이터베이스에 액세스 : 나는 데이터베이스를 가지고 있고 그것을 연결하고있어asp.net 문제 나는 내 웹 사이트를 시작하고 내 데이터베이스에 액세스하려고 할 때이 문제가 있어요
Oops. The error: 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)
을 (파트 내가 사용한 코드는 다음과 같습니다.) :
System.Data.SqlClient.SqlConnection con;
con = new System.Data.SqlClient.SqlConnection();
con.ConnectionString = "Data Source=.\\SQLEXPRESS; AttachDbFilename=C:\\inetpub\\poject\\App_Data\\data.mdf; Integrated Security = true; Connect Timeout = 30; User Instance = True";
어떤 도움을 주시면 감사하겠습니다.
나는 인 AttachDBFilename를 사용하여 DB에 연결되지 않은, 그래서 내가 ' 정말로 여기에서 추측합니다. –
@Mickey 아니, 네 말이 맞아. 그는 그 메시지를 받아서는 안되며, 이것이 그것이 그의 코드라면, "프로젝트"의 철자가 정확하면 도움이 될 것입니다. – Pete
"프로젝트"의 철자가 잘못되었다는 것을 알고 있지만 이것은 내 길에서 철자가 된 것입니다. 이런 방식으로 데이터베이스에 연결하는 다른 방법은 작동하지 않습니까? – hhh