-2
это работает на моем ноутбуке, но когда я загрузить его на сервер не работает, и сказать, что это:Когда я загрузить мои asp.net и файлы базы данных на сервер и попытайтесь открыть веб-сайт
The network path was not found
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.ComponentModel.Win32Exception: The network path was not found
Source Error:
Line 58: using (SqlCommand cmd1 = new SqlCommand("Select word_text from words where word_id = 1", con))
Line 59: {
Line 60: con.Open(); "That show in red"
Line 61: SqlDataReader dr = cmd1.ExecuteReader();
Line 62: if (dr.Read())
Это моя строка соединения с сервером:
Connection string: workstation id=textdatabase.mssql.somee.com;packet size=4096;user id=Naeemh_SQLLogin_1;pwd=t7xtp3wlad;data source=textdatabase.mssql.somee.com;persist security info=False;initial catalog=textdatabase
это соединение, где был в моем ноутбуке:
Connection string:Data Source=Q-PC;Initial Catalog=Text;Integrated
Security=True
Может быть, что соединение с базой данных не является правильным. – Win
Верно, я уверен. – Naeem
Он пишет con.Open(); в красном, когда я открываю с сервера – Naeem