它可以在我的笔记本电脑上运行,但是当我在服务器上传它时无效并说出来:
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
答案 0 :(得分:0)
我忘了改变我的
connection string in the ASP.NET files