Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. General network error

General network error

Scheduled Pinned Locked Moved Database
sysadmindatabasesql-serverhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marix
    wrote on last edited by
    #1

    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!

    D M 2 Replies Last reply
    0
    • M Marix

      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!

      D Offline
      D Offline
      David Salter
      wrote on last edited by
      #2

      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.


      Database FAQ

      1 Reply Last reply
      0
      • M Marix

        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!

        M Offline
        M Offline
        Marix
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups