Trying to get a simple webpage with SQL 2005 Express to work on my hosted site

Discussion in 'ASP .Net' started by Martin Randall, Mar 22, 2006.

  1. Hi,

    I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

    System.Data.SqlClient.SqlException: 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)

    Does anyone have any ideas on this?

    Martin Randall
     
    Martin Randall, Mar 22, 2006
    #1
    1. Advertising

  2. Where is the SQL Server? Is it on a seperate site?
    "Martin Randall" <> wrote in message news:...
    Hi,

    I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

    System.Data.SqlClient.SqlException: 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)

    Does anyone have any ideas on this?

    Martin Randall
     
    Wayne Wengert, Mar 22, 2006
    #2
    1. Advertising

  3. Ah - sorry. The Sql Server 2005 Express file is in the App_Data folder
    "Wayne Wengert" <> wrote in message news:%...
    Where is the SQL Server? Is it on a seperate site?
    "Martin Randall" <> wrote in message news:...
    Hi,

    I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I upload the published site I get...

    System.Data.SqlClient.SqlException: 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)

    Does anyone have any ideas on this?

    Martin Randall
     
    Martin Randall, Mar 22, 2006
    #3
  4. Bad Connection string or a bad SQL Server configuration.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Show me your certification without works,
    and I'll show my certification
    *by* my works.

    "Martin Randall" <> wrote in message
    news:...
    Hi,

    I'm trying to get a simple dataview test page working on my hosted site. The
    hosted site runs ASP.Net 2.0, no problem. The test page works on my
    development machine, no problem... but when I upload the published site I
    get...

    System.Data.SqlClient.SqlException: 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)

    Does anyone have any ideas on this?

    Martin Randall
     
    Kevin Spencer, Mar 22, 2006
    #4
  5. Hmm... thought of those already. Any other ideas? Could it be that my
    hosting company has badly configured SQL Express?


    "Kevin Spencer" <> wrote in message
    news:...
    > Bad Connection string or a bad SQL Server configuration.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > Professional Numbskull
    >
    > Show me your certification without works,
    > and I'll show my certification
    > *by* my works.
    >
    > "Martin Randall" <> wrote in message
    > news:...
    > Hi,
    >
    > I'm trying to get a simple dataview test page working on my hosted site.
    > The hosted site runs ASP.Net 2.0, no problem. The test page works on my
    > development machine, no problem... but when I upload the published site I
    > get...
    >
    > System.Data.SqlClient.SqlException: 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)
    >
    > Does anyone have any ideas on this?
    >
    > Martin Randall
    >
     
    Martin Randall, Mar 22, 2006
    #5
  6. Networking protocols are disabled by default in SQL Server Express.

    If someone simply installs Express and chooses all the defaults, SQL Server Express will only
    be able to have connections originating on the local machine where SQL Server is installed.

    You need to expressly enable networking protocols.

    Follow the instructions outlined at :

    http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
    and
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=271795&SiteID=1



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "Martin Randall" <> wrote in message
    news:%...
    > Hmm... thought of those already. Any other ideas? Could it be that my hosting company has badly
    > configured SQL Express?


    > "Kevin Spencer" <> wrote in message
    > news:...
    >> Bad Connection string or a bad SQL Server configuration.
    >>
    >> --
    >> HTH,
    >>
    >> Kevin Spencer
    >> Microsoft MVP
    >> Professional Numbskull
    >>


    >> "Martin Randall" <> wrote in message
    >> news:...
    >> Hi,
    >>
    >> I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs
    >> ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when I
    >> upload the published site I get...
    >>
    >> System.Data.SqlClient.SqlException: 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)
    >>
    >> Does anyone have any ideas on this?
    >>
    >> Martin Randall
     
    Juan T. Llibre, Mar 22, 2006
    #6
  7. Hi - thanks for the pointer, but I'm not sure if that is relevent. Is it
    something that my hosting company will have to sort out?

    "Juan T. Llibre" <> wrote in message
    news:...
    > Networking protocols are disabled by default in SQL Server Express.
    >
    > If someone simply installs Express and chooses all the defaults, SQL
    > Server Express will only
    > be able to have connections originating on the local machine where SQL
    > Server is installed.
    >
    > You need to expressly enable networking protocols.
    >
    > Follow the instructions outlined at :
    >
    > http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
    > and
    > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=271795&SiteID=1
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > aspnetfaq.com : http://www.aspnetfaq.com/
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "Martin Randall" <> wrote in message
    > news:%...
    >> Hmm... thought of those already. Any other ideas? Could it be that my
    >> hosting company has badly configured SQL Express?

    >
    >> "Kevin Spencer" <> wrote in message
    >> news:...
    >>> Bad Connection string or a bad SQL Server configuration.
    >>>
    >>> --
    >>> HTH,
    >>>
    >>> Kevin Spencer
    >>> Microsoft MVP
    >>> Professional Numbskull
    >>>

    >
    >>> "Martin Randall" <> wrote in message
    >>> news:...
    >>> Hi,
    >>>
    >>> I'm trying to get a simple dataview test page working on my hosted site.
    >>> The hosted site runs ASP.Net 2.0, no problem. The test page works on my
    >>> development machine, no problem... but when I upload the published site
    >>> I get...
    >>>
    >>> System.Data.SqlClient.SqlException: 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)
    >>>
    >>> Does anyone have any ideas on this?
    >>>
    >>> Martin Randall

    >
    >
     
    Martin Randall, Mar 23, 2006
    #7
  8. re:
    > I'm not sure if that is relevent.


    Let me say it another way :

    If the networking protocols are not enabled,
    *nobody* can connect to SQL Server Expres from outside the bix SSE is running in.

    Is that clearer now ?
    Did you read the information in the links I provided for you ?

    re:
    > Is it something that my hosting company will have to sort out?


    YEs. They have to enable SSE's networking protocols,
    by following the instructions in the articles I sent you.

    Request that they do that, and send them the article.
    They might not be aware of what they have to do ( as apperently thay aren't ).




    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "Martin Randall" <> wrote in message
    news:%...
    > Hi - thanks for the pointer, but I'm not sure if that is relevent. Is it something that my hosting
    > company will have to sort out?
    >
    > "Juan T. Llibre" <> wrote in message
    > news:...
    >> Networking protocols are disabled by default in SQL Server Express.
    >>
    >> If someone simply installs Express and chooses all the defaults, SQL Server Express will only
    >> be able to have connections originating on the local machine where SQL Server is installed.
    >>
    >> You need to expressly enable networking protocols.
    >>
    >> Follow the instructions outlined at :
    >>
    >> http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
    >> and
    >> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=271795&SiteID=1
    >>
    >>
    >>
    >> Juan T. Llibre, asp.net MVP
    >> aspnetfaq.com : http://www.aspnetfaq.com/
    >> asp.net faq : http://asp.net.do/faq/
    >> foros de asp.net, en español : http://asp.net.do/foros/
    >> ===================================
    >> "Martin Randall" <> wrote in message
    >> news:%...
    >>> Hmm... thought of those already. Any other ideas? Could it be that my hosting company has badly
    >>> configured SQL Express?

    >>
    >>> "Kevin Spencer" <> wrote in message
    >>> news:...
    >>>> Bad Connection string or a bad SQL Server configuration.
    >>>>
    >>>> --
    >>>> HTH,
    >>>>
    >>>> Kevin Spencer
    >>>> Microsoft MVP
    >>>> Professional Numbskull
    >>>>

    >>
    >>>> "Martin Randall" <> wrote in message
    >>>> news:...
    >>>> Hi,
    >>>>
    >>>> I'm trying to get a simple dataview test page working on my hosted site. The hosted site runs
    >>>> ASP.Net 2.0, no problem. The test page works on my development machine, no problem... but when
    >>>> I upload the published site I get...
    >>>>
    >>>> System.Data.SqlClient.SqlException: 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)
    >>>>
    >>>> Does anyone have any ideas on this?
    >>>>
    >>>> Martin Randall

    >>
    >>

    >
    >
     
    Juan T. Llibre, Mar 23, 2006
    #8
  9. Martin Randall

    Guest

    No it is not clear...

    Having a similar issue, let me re-state the question to be more clear
    on my end...

    I have developed and ASP.NET 2.0 Site in visual Studio 2005. I set up
    the security, defined roles e.t.c.
    I did not set-up any SQL server, including the SQL server Express on my
    development box.
    ASP.NET 2.0 created this MDF file in the APP_Data folder for me and
    took care of the connection.
    This default connection string is not even visible in the config file.

    I did not do any settings AT ALL, including network protocols, SQL
    server express settings whatsoever...

    Then I PUBLISHed this site to my hosted server.

    and I am getting this very same error

    Isn't it supposed to work ?

    My hosted site supports asp.net 2.0

    Do I nned anything other than that?

    Thanks in advance
     
    , Mar 28, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    7
    Views:
    703
    Scott Allen
    Apr 11, 2005
  2. =?Utf-8?B?dmE=?=
    Replies:
    4
    Views:
    2,867
    =?Utf-8?B?dmE=?=
    Feb 22, 2006
  3. Replies:
    1
    Views:
    502
  4. Brad  Brening
    Replies:
    0
    Views:
    471
    Brad Brening
    Mar 1, 2007
  5. Jake Henderson

    Visual Web Developer 2005 Express and SQL 2005 Express

    Jake Henderson, Mar 10, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    263
    Jake Henderson
    Mar 10, 2006
Loading...

Share This Page