У меня MS SQL Server 2005 Express, работающий на VPS.
Я использую pymssql в Python для подключения к моему серверу с помощью следующего кода:
conn = pymssql.connect(host='host:port', user='me', password='pwd', database='db')
и работает отлично.
Когда я пытаюсь подключиться к серверу со страницы ASP.NET C # со следующим кодом:
SqlConnection myConnection = new SqlConnection("Data Source=host,port;Network Library=DBMSSOCN; Initial Catalog=db;User ID=me;Password=pwd;");
myConnection.Open();
Когда я запускаю страницу ASP.NET, я получаю следующее исключение в 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, но мне не повезло.
Кто-нибудь может указать мне на то, что мне здесь не хватает?
Спасибо!