+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / An error has occurred while establishing a connection to the server

An error has occurred while establishing a connection to the server

11 posts, 0 answered
  1. FERNANDO
    FERNANDO avatar
    7 posts
    Registered:
    11 Sep 2008
    19 Sep 2008
    Link to this post

    I recently installed the Sitefinity.  I did not receive any errors during the installation.  When I starte Sitefinity 3.2, there is option to create the sample website.  I initiate the creation and after a few minutes, I get an error as followed.

    "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 Interface, error: 26 - Error Locating Server/Instance Specified)"

    I would appreciate any assistant and/or help.

    Fernando

  2. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    20 Sep 2008
    Link to this post
    Hi Fernando,

    I think this is a SQL Server 2005 permissions issue.  Check out Microsoft's KB article on this subject:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

    Hopefully this helps, but please let me know if it does not.

    Gabe Sumner

  3. FERNANDO
    FERNANDO avatar
    7 posts
    Registered:
    11 Sep 2008
    22 Sep 2008
    Link to this post
    Hi Gabe,
    I had found this article on the Internet prior to receiving your email and performed the recommended steps.  Unfortunately, I continue to receive the same error.  I had set the Local and Remote Connections to use both TCP/IP and named pipes because I am not sure what I am using.  Also, the SQL Server Browser Service was already enabled and running.

    I really appreciate you helping on this issue.  I am not a SQL Server 2005 or Web Developer guru.  Oh, by the way, I did not install the standard edition.  I downloaded the community.  I wondering if that is the cause of my trouble.

    Fernando
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Sep 2008
    Link to this post
    Hi FERNANDO,

    Are you still getting the same error message?
    If you followed the steps described in the Microsoft's KB article, would you please also check your connection string( IP address, UidPwd) in the Sitefinity's Web.config file.


    Regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. FERNANDO
    FERNANDO avatar
    7 posts
    Registered:
    11 Sep 2008
    22 Sep 2008
    Link to this post

    Hi Ivan,
    I am not sure which web.config you want me to check and what section.  There is one web_config uder the folder C:\Program Files\telerik\Sitefinity3.2 Community\WebSites\TIUSite_v3.2.SP2\web_config and another one under C:\Program Files\telerik\Sitefinity3.2 Community\WebSites\TIUSite_v3.2.SP2\Sitefinity.

    Here is the content for the web_config under C:\Program Files\telerik\Sitefinity3.2 Community\WebSites\TIUSite_v3.2.SP2\Sitefinity.  Note: there is no IP, UID, or Pwd. 

    <?xml version="1.0"?>

    <!--

    Note: As an alternative to hand editing this file you can use the

    web admin tool to configure settings for your application. Use

    the Website->Asp.Net Configuration option in Visual Studio.

    A full list of settings and comments can be found in

    machine.config.comments usually located in

    \Windows\Microsoft.Net\Framework\v2.x\Config

    -->

    <configuration>

    <appSettings/>

    <connectionStrings/>

    <system.web>

    <pages>

    <controls>

    <add tagPrefix="sf"

    namespace="Telerik.Cms.Web.UI" assembly="Telerik.Cms.Web.UI"/>

    <add tagPrefix="sf"

    namespace="Telerik.Cms.Web.UI" assembly="Telerik.Cms"/>

    <add tagPrefix="sfSec"

    namespace="Telerik.Security.WebControls" assembly="Telerik.Security"/>

    </controls>

    </pages>

    </system.web>

    </configuration>


    However, there is a connectionString section in the web_config under the C:\Program Files\telerik\Sitefinity3.2 Community\WebSites\TIUSite_v3.2.SP2\web_config

    <connectionStrings>
        <add name="Sitefinity" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Sitefinity.mdf"
    providerName="System.Data.SqlClient"/>
      </connectionStrings>


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Sep 2008
    Link to this post
    Hello FERNANDO,

    Please make sure your connection string is properly defined. The following example illustrates a connection string declaration:

    <add name="Sitefinity" connectionString="Data Source=[DBServerNameOrIPAddress];   
    Initial Catalog=myDataBase;Uid=myUsername;Pwd=myPassword"    
    providerName="System.Data.SqlClient"/>  
     

    For more information please refer to http://www.connectionstrings.com.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. FERNANDO
    FERNANDO avatar
    7 posts
    Registered:
    11 Sep 2008
    25 Sep 2008
    Link to this post
    Hi Ivan,
    Thanks for providing the sample connection and the link.  It was very helpful.  I had to manually attached the SiteFinity database because I was having problems but once it was attached and made the changes to the connectionString, I getting a different error.  I noticed there were two user id called ASPNET.  One of them is prefix with the server name (FSLAPTOP\ASPNET).  I am not sure what is happening once I click the browse link for the sample website but I am getting a create table permission error.  What are the permission and roles that I should assigned to the ASPNET user id on the SiteFinity database?

    Fernando

  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Sep 2008
    Link to this post
    Hello FERNANDO,

    You should grant permissions to the ASP.NET accounts and set the computer user as a database owner.

    Let us know if you need further assistance.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. FERNANDO
    FERNANDO avatar
    7 posts
    Registered:
    11 Sep 2008
    26 Sep 2008
    Link to this post
    Hi Ivan,
    Thanks for the help...I do appreciate it.  I was able to see the sample website.  I am on my way to exploring the Sitefinity.  Thanks again!  Fernando
  10. Om
    Om avatar
    2 posts
    Registered:
    03 Sep 2010
    05 Sep 2010
    Link to this post
    Thanks Fernando.
    Your trick of manually attaching the sitefinity.mdf worked for me.
    System Configuration: SF 4.0 Beta, Sql Express 2008, Vista Premium.
    I know this is an old thread but I will summarized my steps in case anyone needs.
    I create a TestProject and it gave me the same error. I tried all TCP/IP settings and all but no success.
    Then I closed everything, opened my sql express management studio and attached sitefinity.mdf in my ../TestProject/App_Data folder.
    Note: I had to give my windows user full access to TestProject folder.
    After successfully attaching the db to my sql express instance, opened the web.config ../Testproject/web.config and added this connectionstring:
    <connectionStrings>
        <add name="Sitefinity" connectionString="Data Source=machineName\SQLExpress;Integrated Security=True;User Instance=True;Initial Catalog=sitefinity1"
    providerName="System.Data.SqlClient"/>
      </connectionStrings>

    Note: I named my db to "sitefinity1" and used windows integrated security to keep it simple because my user account was already having full access to my server. I could have created a new user login and granted access to sitefinity1.

    Updated:
    I also found another workaround.
    1: Open Sql Express management studio and created a new database "testsitefinity"
    2: Create a new project in project manager and open it by double-clicking it.
    3: Now under database configuration I selected "Sql Server" instead of SqlExpress though I am using express edition.
    4: Selected Window Integreated  authentication
    5: machine/SqlExpress, as my sql server instance
    6. "TestSiteFinity" as Database name.

    Then the process went smoothly. I didn't have to modify web.config or anything.

    Thanks again.
  11. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    06 Sep 2010
    Link to this post
    Hi Om,

    Thank you for sharing your experience. I am sure it will come in handy to other users.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
11 posts, 0 answered