Hello everyone...
I am a newbie to .NET and the having some problem with the site i created and uploaded .
On accessing the home page i get the error-'Server Error in / application.'
'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) '
I spoke to the people of the hosting company and they say that the problem is with the coding and the server is alrite...
here is my .cs file code-
Can someone plz help me how to overcome the issue...
I had made it in the 3.5 framework and their server has 2.0 framework....
Does the web.config file requires any configuration..
plz help me out....
its very urgent....
thank you...
I am a newbie to .NET and the having some problem with the site i created and uploaded .
On accessing the home page i get the error-'Server Error in / application.'
'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) '
I spoke to the people of the hosting company and they say that the problem is with the coding and the server is alrite...
here is my .cs file code-
Code:
protected void Page_Load(object sender, EventArgs e) { string ConnectionString = "Server=address;Database=db_name;Uid=userid;Pwd=password;"; SqlConnection conn = new SqlConnection(ConnectionString); conn.Open(); string cmd = "select * from table_name"; SqlCommand cm = new SqlCommand(cmd, conn); SqlDataAdapter da = new SqlDataAdapter(cm); DataTable dt = new DataTable(); da.Fill(dt); conn.Close(); memb.DataSource = dt; Page.DataBind(); }
I had made it in the 3.5 framework and their server has 2.0 framework....
Does the web.config file requires any configuration..
plz help me out....
its very urgent....
thank you...
Comment