mssql 链接问题
数据库链接的问题,在本机可以执行,文件上穿的服务器上以后,无法执行[web.config]
<connectionStrings>
<add name="pcConnectionString" connectionString="Data Source=localhost;Initial Catalog=forcperi;User ID=forcperi;Password=forcperi"
providerName="System.Data.SqlClient" />
</connectionStrings>
[code]
protected void btnExcute_Click(object sender, EventArgs e)
{
string Sqlcommand;
Sqlcommand = txtSql.Text;
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["pcConnectionString"].ConnectionString);
SqlCommand excuteSql = new SqlCommand(Sqlcommand, conn);
conn.Open();
excuteSql.ExecuteNonQuery();
conn.Close();
}
显示错误
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
--------------------编程问答-------------------- need help --------------------编程问答-------------------- 用户名和密码是不是错了?
补充:.NET技术 , ASP.NET