-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