sql server connection string to connect through domain name(internet)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apselvamdp
    New Member
    • Sep 2012
    • 4

    sql server connection string to connect through domain name(internet)

    Hi all,
    I have tried to connect my sql server 2005 using a domain name. i have bought a domain name and a dns client. this is my connection string
    Code:
    { SqlConnection sqlconn = 
     new SqlConnection("user id=user1;" + "password=pass2;"
      + "server=www.mysite.info\\ServerInstance;" 
    + "trusted_Connection=false;" + "network 
    library=DBMSSOCN;" + "Integrated security=false;" 
    + "initial catalog=Mydatabase;" +"connection timeout=5
    ;"); }
    I have added sql browser & sql server in fire wall, and also enabled tcp port 1433 and udp port 1434. the above connection string works perfect when i run it in the server machine, buy when i try to run it on other machines i am getting an error that server is not available or cannot find the specified server..
    I desperately need to access my database through an url. ie., through internet..
    Help me if you can.. I will loose my job if i fails to do this.. so please anybody help me..
    Last edited by zmbd; Sep 20 '12, 12:52 PM. Reason: Please use th <CODE/> format button when posting SQL and program code. (also formated code for easier read... may not cut and paste well)
  • ariful alam
    New Member
    • Jan 2011
    • 185

    #2
    is your accessing program and the database server in one PC or database server in one PC and accessing program in another PC?

    Comment

    • apselvamdp
      New Member
      • Sep 2012
      • 4

      #3
      accessing program is in another PC,ie.,through internet from any where. My SQL server is running in my laptop. my program cannot locate my sqlserver. I tried this, http://www.it-sideways.com/2008/02/c...rver-2005.html, but no use. I dont know where i went wrong..

      Comment

      • ariful alam
        New Member
        • Jan 2011
        • 185

        #4
        Do your laptop has a unique ip which we have to buy from the ip authority? if not then your pc has an ip address that is reserved ip address which we use in our internal network. so, that may be not work.

        if your SQL server is hosted in any web server that may be accessed by your program from any computer from anywhere in the world.

        Comment

        • apselvamdp
          New Member
          • Sep 2012
          • 4

          #5
          I dont have a unique IP, But I have bought a domain name and also i have dynamic dns client to update my public ip.
          I can host my website pages through apache, I want to know how to host my sql server?

          Comment

          • ariful alam
            New Member
            • Jan 2011
            • 185

            #6
            Are you using your public ip on your laptop or in any isp's hosting server?

            Comment

            • apselvamdp
              New Member
              • Sep 2012
              • 4

              #7
              yes. I am using public IP in my laptop only.

              Comment

              Working...