VPS에서 실행중인 MS SQL Server 2005 Express가 있습니다.ASP.NET C# 페이지에서 SQL Server 2005 Express에 연결할 수 없습니다.
conn = pymssql.connect(host='host:port', user='me', password='pwd', database='db')
을하고 완벽하게 작동합니다 다음 코드 내 서버에 연결 파이썬에서 pymssql을 사용하고 있습니다. 나는 다음과 같은 코드를 가진 ASP.NET C#을 페이지에서 서버에 연결하려고 할 때 : 내가 myConnection.Open (에서 다음과 같은 예외가 ASP.NET 페이지를 실행하면)
SqlConnection myConnection = new SqlConnection("Data Source=host,port;Network Library=DBMSSOCN; Initial Catalog=db;User ID=me;Password=pwd;");
myConnection.Open();
;:
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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
SQL Server를 다시 시작하려고했지만 운이 없었습니다. 누군가 내가 여기 놓친 부분을 지적 할 수 있습니까?
감사합니다.
문제가 서버를 시작하거나 연결? 그리고인가 "host = 'host : port'"가 코드에 실제로 없기를 바랍니다. 'sqlcmd'를 사용하여 명령 프롬프트에서 서버에 연결을 시도하십시오. – m0s
다른 연결 문자열을 사용해보십시오. http : //www.connectionstrings. com –
이 문제에 대한 해결책을 찾았습니까? 동일한 문제가 발생했습니다. –