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

Forums / Deployment / Alternatives to SQL Express User Instance Connections

Alternatives to SQL Express User Instance Connections

4 posts, 0 answered
  1. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    25 Mar 2009
    Link to this post
    The default connection string for SQL Express 2005 looks like this:

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

    I have come to loathe User Instance because it means that only one process at a time can access the database (namely ASP.NET).

    In the Sitefinity 3.2 days I had a SQL connection string that worked:

    add name="Sitefinity" connectionString="server=.\SQLExpress;uid=the_database_owner;pwd=the_password;database=TheSitefinityDatabase;" providerName="System.Data.SqlClient" /> 

    Now, in 3.6, when I try same connection string, I get:

    Server Error in '/Take6' Application.

    This type of page is not served.

    Description: The type of page you have requested is not served because it has been explicitly forbidden.  The extension '.aspx' may be incorrect.   Please review the URL below and make sure that it is spelled correctly.

    Requested URL: /Take6/Sitefinity/Admin/Modules.aspx


    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053




    The connection string works in Visual Studio's Server Explorer. I can even create new tables.

    Any pointers for getting SQL authentication working? I'm even open to Windows Authentication. I just want to get away from User Instance.

    Thanks,
    Jeff
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Mar 2009
    Link to this post
    Hello Jeff,

    The problem does not seems to be SQL connection. It looks like you do not have permissions to access your modules section. If the problem is related to the connection you should get the following error( or similar one)
    "Cannot open database "SitefinityDB" requested by the login. The login failed. Login failed for user "

    Check your permission settings. Make sure that you have Modules.aspx under ~/Sitefinity/Admin/ folder.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    25 Mar 2009
    Link to this post
    Hi Ivan,

    I don't think it's a permissions issue. I can swap in the default connection string and everything works fine.

    Modules.aspx is in it's normal spot and I did not change the NTFS permissions.

    Any other ideas? Is someone willing to try accessing the Sitefinity DB through SQL authentication to see if they can reproduce the problem?

    Thanks,
    Jeff

  4. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    21 Nov 2016
    30 Mar 2009
    Link to this post
    Hi Jeff,

    This is how the connection string for SQL 2005 Database with Windows Authority should look like.
     <add name="Sitefinity" connectionString="data source=ND\SQLEXPRESS;Integrated Security=SSPI;initial catalog=Sitefinity" 
          providerName="System.Data.SqlClient" /> 

    Don't forget to create a DB User with NT System and in some cases NT Service rights.

    If this does not help, could you please give us some details on the DB transferring? Are you directly attaching the Sitefinity.mdf file to the server or create a new DB and dump the Sitefinity.mdf in it?

    All the best,
    Nikolai
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered