Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wiebe Tijsma 16 posts 92 karma points
    Apr 05, 2014 @ 12:47
    Wiebe Tijsma
    0

    Install 7.1 clean database in SQL Server

    Hi,

    I'm trying to get started with Umbraco 7.1.

    I followed these steps:

    http://our.umbraco.org/documentation/installation/install-umbraco-manually

    I created a new project, installed umbraco using nuget, created an empty SQL Server database, set the connectionstring correctly, but when I start the installer, it just hangs.

    When I inspect the http requests, it's accessing this URL which throws an exception:

    localhost:51306/install/api/GetSetup

    the content is:

    )]}',
    {"Message":"An error has occurred.","ExceptionMessage":"Invalid object name 'umbracoUser'.","ExceptionType":"System.Data.SqlClient.SqlException","StackTrace":"   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\r\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\r\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteScalar()\r\n   at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\\Code\\github\\SamSaffron\\MiniProfiler\\StackExchange.Profiling\\Data\\ProfiledDbCommand.cs:line 299\r\n   at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()\r\n   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n   at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)\r\n   at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy)\r\n   at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command)\r\n   at Umbraco.Core.Persistence.Database.ExecuteScalar[T](String sql, Object[] args)\r\n   at Umbraco.Web.Install.InstallHelper.get_IsBrandNewInstall()\r\n   at Umbraco.Web.Install.InstallHelper.GetInstallationType()\r\n   at Umbraco.Web.Install.InstallHelper.<GetStepsForCurrentInstallType>b__1(InstallSetupStep x)\r\n   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Umbraco.Web.Install.Controllers.InstallApiController.GetSetup()\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()\r\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}

     I don't understand why it would try to access the database tables before the installer runs, that seems a bit strange, or am I missing some manual steps to set up the database before I run the installer?

    Thanks,

    Wiebe

     

  • Charles Afford 1163 posts 1709 karma points
    Apr 05, 2014 @ 14:14
    Charles Afford
    0

    Hi what credentials are you putting in on the database step of the installer?

    ServerName

    Username

    Password.

    If you open SQL management studio can you log in using those details?

    Charlie :)

  • Wiebe Tijsma 16 posts 92 karma points
    Apr 05, 2014 @ 14:36
    Wiebe Tijsma
    106

    Hi Charlie,

    I didn't get any steps at all, the installer hung on the first screen.

    I think I figured out what was wrong, I shouldn't have configured the connection string in the web.config yet, as the installer assumes that when there is a connection string, the database is already set up, I figured this out by going through the umbraco source code.

    Thanks for the quick response!

     

    Wiebe

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Apr 05, 2014 @ 18:44
    Jan Skovgaard
    0

    Hi Wiebe and welcome to our :)

    Have you checked that all prerequisites has been installed?

    Could you perhaps try and download webmatrix and try installing Umbraco using it? Once that is done all prerequisites that Umbraco needs in order to work will be installed before Umbraco is installed. Once these are installed you should be able to manually install Umbraco in there future.

    Hope this helps.

    /Jan

  • Wiebe Tijsma 16 posts 92 karma points
    Apr 05, 2014 @ 18:47
    Wiebe Tijsma
    0

    Hi Jan,

    Thanks a lot!

    I already found a solution, see my previous post (I think you only saw my first post)...

    I made a mistake, I already added the connection string in the web.config before installing...

    - Wiebe

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Apr 05, 2014 @ 18:55
    Jan Skovgaard
    0

    Oh! Yes you're absolute right, missed that! :D

    Glad you got it sorted out.

    /Jan

  • Matthew 138 posts 199 karma points
    Apr 06, 2014 @ 23:47
    Matthew
    0

    I'd like to be able to do the migration to SQL Express but after running the migration through Webmatrix, I can't login to umbraco, nothing happens after entering username and password.  Fresh install of 7.1, login and out fine, migrate to SQL Express, no more fun.  Any ideas?

  • Jesper 3 posts 23 karma points
    Apr 08, 2014 @ 10:25
    Jesper
    0

    It seems v 7.1 stopped crating tables in database predefined in connectionstring on installation.

    In earlier versions I use to set my windows authenticated connectionstring right after Visual Studio project creation before accessing the site for the first time and Umbraco created the tables.

    Sadly that feature is gone and now it instists on creating a sdf file.

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Apr 08, 2014 @ 10:51
    Jan Skovgaard
    0

    Hi Matthew

    Did you remember to change the connection string manually after the migration?

    /Jan

  • Niels Lynggaard 180 posts 517 karma points
    Apr 08, 2014 @ 11:57
    Niels Lynggaard
    0

    Hi Matthew

    I had a similar issue the other day, migrating from SQLCE to real SQL.

    The Webmatrix renamed my connection string name to "Umbraco", and that didn't seem to work well, so I updated my connectionstring and gave it the name "umbracoDbDSN" instead like this:

    <add name="umbracoDbDSN" connectionString="Data Source=SQLSERVER;Initial Catalog=xxxxx;User ID=xxxxx;Password=xxxxxxxx" providerName="System.Data.SqlClient" />

    That seemed to work, and I'm able to log in.

    Cheers,

    Niels

     

  • Matthew 138 posts 199 karma points
    Apr 08, 2014 @ 17:37
    Matthew
    0

    Hi Jan, Niels.  I looked at the connection string but couldn't tell if it was correct or not.  I tried a few of the changes suggested but nothing was working so I blew it off and started fresh with a SQL db from the beginning, rather than CE and trying to migrate it. 

    When I have a chance, I'll go back and try your string, Niels.  When I was doing this, I found a lot of people saying to change the string, and that it had fixed it but not what the string and/or modifications actually were.  I appreciate that you included the actual string.  That will be useful to everyone.

    Matthew

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Apr 08, 2014 @ 23:23
    Jan Skovgaard
    0

    Hi Matthew

    After migrating the connection string should look like this

    <add name="umbracoDbDSN" connectionString="Data Source=[yourdatabateserver];Initial Catalog=[yourdatabase];User ID=[UserName];Password=[Password]" providerName="System.Data.SqlClient" />
    

    Make sure to change the values from [value] to your value...the [] should not be in there either.

    Hope this makes sense and that it's what you're after.

    /Jan

  • Matthew 138 posts 199 karma points
    Apr 09, 2014 @ 00:02
    Matthew
    0

    Thanks Jan, that is clear, although the string I ended up with was:

    <add name="umbracoDbDSN" connectionString="server=.\SQLEXPRESS;database=MyDb;user id=MyUser;password=MyPwd" providerName="System.Data.SqlClient" />

    It seems to work fine but isn't like yours, no 'Data Source=..." or Initial Catalog=...". I don't think it matters but...   does it?

     

  • Jan Skovgaard 11257 posts 23497 karma points MVP 7x admin c-trib
    Apr 09, 2014 @ 08:21
    Jan Skovgaard
    0

    Hi Matthew

    Nope if it works it does not matter :)

    /Jan

  • Eric Schrepel 153 posts 206 karma points
    Jun 06, 2014 @ 03:54
    Eric Schrepel
    0

    Having a hard time upgrading a 6.1.6 site on SQL Server to 7.1.4 using some of the steps outlined above. Here are the errors and steps I've tried to proceed:

    1. Error: DFcmsMacroPropertymacroPropertyHidden' is not a constraint.
      Solution: ran SQL code at bottom of http://our.umbraco.org/forum/getting-started/installing-umbraco/46251-Database-error-during-upgrade-to-v7?p=1 to remove constraints
    2. Error: /api/GetSetup causes 500 Exception.
      Solution: removed umbracodbDSN connection string from my web.config file, as suggested at http://our.umbraco.org/forum/getting-started/installing-umbraco/50235-Installing-Umbraco-711-GetSetup-An-error-has-occurred
    3. Error:  after the initial "Install Umbraco 7" screen, if I click either Install, or Customize (and then supply either the connection string to the existing database or do it by using the UI to choose the database), then I get "provider use key supplied is invalid. It must be of type System.Securty.Principal.SecurityIdentifier.Parameter name: providerUserKey"
      Solution:  ?
    And so now I'm stuck. All permissions seem fine, Full Trust environment, etc.
    Any thoughts about dealing with any of those errors in a different way?
  • leeatkinson 33 posts 44 karma points
    Sep 10, 2014 @ 15:39
    leeatkinson
    0

    I've just had this problem today.

    The reason is that I used the same script I used to install v6 to install v7. My script would add the databse details into web.config to save time typing the details in. Is there anyway to 'bootstrap' this more, rather than having to type in the details?

    Thanks

     

  • James Star 17 posts 38 karma points
    Oct 06, 2014 @ 06:00
    James Star
    0

    Hello, I'm in the same situation. So where do you put the connection string if not in the web config? Thank you.

  • James Star 17 posts 38 karma points
    Oct 06, 2014 @ 06:19
    James Star
    0

    Okay, understand. Remove connection string from web.config and Umbraco 7 installation creates a SDF file. Okay, but my next problem is lazyload is undefined.

    Any ideas?

  • Daniel 44 posts 187 karma points
    Apr 17, 2015 @ 14:52
    Daniel
    0

    For me the problem was that the website didnt have access to the database during the upgrade, then I got the javascript error /api/GetSetup causes 500 Exception. No other error messages during the upgrade process, just an image with paople waving their hands.

  • carbonrb 22 posts 71 karma points
    Nov 11, 2015 @ 21:02
    carbonrb
    0

    Hello,

    We provide Umbraco hosting and automatically populate the connection string when creating a new installation of Umbraco.

    Did anyone find a way to allow this? I don't really want to make our clients have to manually enter this information!

    Thanks,

    Richard

  • Marcio Goularte 356 posts 1244 karma points
    Jan 28, 2017 @ 01:57
    Marcio Goularte
    0

    Hello everybody. I went through this with Azure. I created an application with a linked database. When I tried to install it always gave these error: 500 Internal Server error /install/api/GetSetup. Analyzing the log I discovered that the installation tried to connect to the database, even though it was a new installation. The log had this error: Invalid object name 'umbracoUser'. I then updated the azure database and unlinked it from the web application and returned to normal.

Please Sign in or register to post replies

Write your reply to:

Draft