General network error
-
Hi I have a very very simple web application that does only one thing - tries to open a connection to SQL server. On my PC it works fine. Connection is opened immediately! But when I put that application on my host server I get this error "General network error. Check your network documentation."!! The code is: private void Page_Load(object sender, System.EventArgs e) { this.sqlConnection1.Close(); this.sqlConnection1.ConnectionString = "Data source=myServerIPAddress;Initial Catalog=dbName;User ID=user;Password=passwd"; try { this.sqlConnection1.Open(); } catch(System.Data.SqlClient.SqlException ex) { this.Label1.Text = ex.Message; } finally { this.sqlConnection1.Close(); } } Doeas anyone know why is that so? I tried tu turn pooling off, set bigger timeout but useless!
-
Hi I have a very very simple web application that does only one thing - tries to open a connection to SQL server. On my PC it works fine. Connection is opened immediately! But when I put that application on my host server I get this error "General network error. Check your network documentation."!! The code is: private void Page_Load(object sender, System.EventArgs e) { this.sqlConnection1.Close(); this.sqlConnection1.ConnectionString = "Data source=myServerIPAddress;Initial Catalog=dbName;User ID=user;Password=passwd"; try { this.sqlConnection1.Open(); } catch(System.Data.SqlClient.SqlException ex) { this.Label1.Text = ex.Message; } finally { this.sqlConnection1.Close(); } } Doeas anyone know why is that so? I tried tu turn pooling off, set bigger timeout but useless!
I've seen a similar thing when using Names Pipes if you don't have sufficient authentication to connect to the server. Are you using names pipes? If so, try changing to TCP/IP and see if the problem goes away. If it does, then its a security issue.
-
Hi I have a very very simple web application that does only one thing - tries to open a connection to SQL server. On my PC it works fine. Connection is opened immediately! But when I put that application on my host server I get this error "General network error. Check your network documentation."!! The code is: private void Page_Load(object sender, System.EventArgs e) { this.sqlConnection1.Close(); this.sqlConnection1.ConnectionString = "Data source=myServerIPAddress;Initial Catalog=dbName;User ID=user;Password=passwd"; try { this.sqlConnection1.Open(); } catch(System.Data.SqlClient.SqlException ex) { this.Label1.Text = ex.Message; } finally { this.sqlConnection1.Close(); } } Doeas anyone know why is that so? I tried tu turn pooling off, set bigger timeout but useless!
The problem was that, that my host-server and sql server wad in one domain and they use different internal ip addresses, but I was given a different sql server address so I could reac it from outside the domain.:) So I got the real ip and everything works fine! Thanx