Interview Question in SQL Server Security
Interview Question :: ASP.NET 2.0 cSharp program is not connect to sql server 2005
This is the program
protected void Button1_Click(object sender, EventArgs e)
{
string isuruConnectionString = "Data source=HOME-D476A40965/SQLEXPRESS;Initia... 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.And I using visual studio 2005.
What is the problem(s)?.

Loading ...