veera
2007-06-13 09:05:55 UTC
protected void Button1_Click(object sender, EventArgs e)
{
string isuruConnectionString = "Data source=HOME-D476A40965/SQLEXPRESS;Initial Catalog=isuru; Integrated Security=True";
string sql = "INSERT INTO tan(name,passwd)value('333','444')";
SqlConnection con = new SqlConnection(isuruConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
con.Open() line is highlighted and display this error.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
But I was alow remote connection to sql server using "sql server serface aria configuration"option.
What is the problem(s)?.