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. Web Development
  3. ASP.NET
  4. asp.net connection string

asp.net connection string

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasesysadminhelpquestion
8 Posts 3 Posters 8 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.
  • O Offline
    O Offline
    omer erakman
    wrote on last edited by
    #1

    hi i developed a website using asp.net c# and sqlexpress (2005). It works fine on my machine but when publish it to host i always take this error message: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) My database files are in App_Data directory. I am accessing them from there. the host doesnt allow remote connections. I think the connection string can cause this problem but i dont know how to solve it. Here is my connection string: And for databases, i use windows authentication. Can it be about it? i dont know how can i create user for a database in App_Data folder. thanks.

    N D 2 Replies Last reply
    0
    • O omer erakman

      hi i developed a website using asp.net c# and sqlexpress (2005). It works fine on my machine but when publish it to host i always take this error message: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) My database files are in App_Data directory. I am accessing them from there. the host doesnt allow remote connections. I think the connection string can cause this problem but i dont know how to solve it. Here is my connection string: And for databases, i use windows authentication. Can it be about it? i dont know how can i create user for a database in App_Data folder. thanks.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Is SQLExpress installed on your host?


      only two letters away from being an asset

      O 1 Reply Last reply
      0
      • N Not Active

        Is SQLExpress installed on your host?


        only two letters away from being an asset

        O Offline
        O Offline
        omer erakman
        wrote on last edited by
        #3

        Yes it is installed, they told me "use SQLExpress" before

        1 Reply Last reply
        0
        • O omer erakman

          hi i developed a website using asp.net c# and sqlexpress (2005). It works fine on my machine but when publish it to host i always take this error message: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) My database files are in App_Data directory. I am accessing them from there. the host doesnt allow remote connections. I think the connection string can cause this problem but i dont know how to solve it. Here is my connection string: And for databases, i use windows authentication. Can it be about it? i dont know how can i create user for a database in App_Data folder. thanks.

          D Offline
          D Offline
          Dhyanga
          wrote on last edited by
          #4

          check whelter you sql server allows remote connection or not... please check in sql server configuration manager and put enable tcp/ip also.

          suchitamanandhar@hotmail.com

          O 1 Reply Last reply
          0
          • D Dhyanga

            check whelter you sql server allows remote connection or not... please check in sql server configuration manager and put enable tcp/ip also.

            suchitamanandhar@hotmail.com

            O Offline
            O Offline
            omer erakman
            wrote on last edited by
            #5

            It will not help, if i will change my sql server settings. Because the problem is when publishing website on my host. And my host does not allow remote connections with sql server. I am asking what my connection string should be to not make a remote connection.

            D 1 Reply Last reply
            0
            • O omer erakman

              It will not help, if i will change my sql server settings. Because the problem is when publishing website on my host. And my host does not allow remote connections with sql server. I am asking what my connection string should be to not make a remote connection.

              D Offline
              D Offline
              Dhyanga
              wrote on last edited by
              #6

              ok may be you windows firewall is ON.If so, please OFF your firewall and then check.

              suchitamanandhar@hotmail.com

              O 1 Reply Last reply
              0
              • D Dhyanga

                ok may be you windows firewall is ON.If so, please OFF your firewall and then check.

                suchitamanandhar@hotmail.com

                O Offline
                O Offline
                omer erakman
                wrote on last edited by
                #7

                How can i close firewall on host? :confused:

                D 1 Reply Last reply
                0
                • O omer erakman

                  How can i close firewall on host? :confused:

                  D Offline
                  D Offline
                  Dhyanga
                  wrote on last edited by
                  #8

                  i mean you have to close the firewall of the computer where your sql server resides.If your sql server is in the host computer, then you have to request them to close....or change some configuration in the firewall so that firewall recognizes your sql server.

                  suchitamanandhar@hotmail.com

                  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