Copied to clipboard

Flag this post as spam?

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


  • Michiel (NSC) 95 posts 115 karma points
    Apr 25, 2011 @ 01:05
    Michiel (NSC)
    0

    Installer hangs at Opening database connection... when using SQL Server CE 4

    I am running the latest version of Umbraco (4.7.0) and I am following the instructions for using SQL Server CE 4.0 (still for Umbraco 4.6!). I downloaded the separate SQLCE4Umbraco.dll assembly (from the Umbraco 4.6.1 release page, since it's nowhere to be found on the 4.7.0 release page on Codeplex).

    I also added the Bin Deployable Assemblies through Visual Studio 2010 SP1. I have Umbraco CMS as a Web Site project, so the assemblies were added directly to the Bin folder of the web site.

    At this point, the Umbraco installer let's me select the SQL CE option with the optimistic message: "Nothing to configure:SQL CE 4 does not require any configuration, simply click the "install" button to continue."

    Well, it turns out it's not that simple. When I click the "Install" button the Umbraco installer just displays a progress bar at 5% for hoewever long I wait, with the text "Opening database connection..."

    I checked the Umbraco.sdf file, no process is using it.

    How is this supposed to work?

     

  • Michiel (NSC) 95 posts 115 karma points
    Apr 25, 2011 @ 01:15
    Michiel (NSC)
    0

    I also checked the feed that the progress bar is 'connected' to, here is the status for http://localhost:54109/Umbraco-4.7.0.378/install/utills/p.aspx?feed=progress:

    {
        "percentage": "5",
        "message": "Opening database connection...",
        "error": ""
    }

     

  • Michiel (NSC) 95 posts 115 karma points
    Apr 25, 2011 @ 01:27
    Michiel (NSC)
    0

    It turns out that after ~10 minutes the progress bar ends up at -1%

  • Lesley 284 posts 143 karma points
    Apr 26, 2011 @ 01:09
    Lesley
    0

    Hi Michiel,

    Is this a clean (new) install or an upgrade from an earlier version?

    I _think_ 4.7 comes with SQLSE out of the box, but that may have been because I installed it via Microsoft WebMatrix. Are you able to easily roll back and try the installer without any modification? 

    Lesley

  • Michiel (NSC) 95 posts 115 karma points
    Apr 26, 2011 @ 09:24
    Michiel (NSC)
    0

    Yes, a clean install based on the download from Codeplex, which does not come with SQL CE support out of the box, the installer directs me to the wiki for instructions to download it. No need to rollback since nothing has changed at that point in the setup.

    Any idea what it could be?

  • Lesley 284 posts 143 karma points
    Apr 26, 2011 @ 23:53
    Lesley
    0

    Hi Michiel,

    Maybe there are changes since the 4.6 version of sqlce4umbraco.dll that you tried. (Which of the three options for install have you been following on that page?)

    I think you could delete your bin directory and start afresh. Download the 4.7 "web deploy" zip from codeplex http://umbraco.codeplex.com/releases/view/62573 (under "other available downloads") and you can use the bin folder from there. It contains all the SQLCE DLLs ready to go. No need to open Visual Studio, just drop it in the file system.

    (And it's always worth double-checking those folder permissions!)

  • Michiel (NSC) 95 posts 115 karma points
    Apr 27, 2011 @ 12:26
    Michiel (NSC)
    0

    Hey Lesley,

    Thanks for your help! I followed the 3rd set of instructions from the Umbraco wiki. I checked the version of sqlce4umbraco.dll, it's 1.0.0.0 both in the Codeplex download for Umbraco 4.6 as in the bin folder of the 4.7 web deploy file. 

    I should copy the one from the web deploy, I will try that tonight, but based on the versioning I expect they are the same. EDIT: have tried it, doesn't make a difference.

    About folder permissions: I can open the .sdf file in Visual Studio, and I run Umbraco from that same instance of Visual Stduio, so the development webserver should have the exact same permissions. 

    How can I debug this issue? I downloaded the Umbraco 4.7 source but it doesn't start the installer when I run it from Visual Studio, it always goes straight to the login screen for all URLs.

     

  • Lesley 284 posts 143 karma points
    Apr 30, 2011 @ 02:23
    Lesley
    0

    Hi Michiel,

    Did you copy the whole bin folder from the web deploy? You should have the following files which are required for sqlce:

     

    • sqlce4umbraco.dll
    • system.data.sqlserverce.dll
    • system.data.sqlserverce.entity.dll
    • folder amd64 containing 6 more DLLs and a folder
    • folder x86 also with 6 DLLs and a folder.

     

    I'm guessing you're missing one or more of these?

     

  • Michiel (NSC) 95 posts 115 karma points
    May 02, 2011 @ 09:10
    Michiel (NSC)
    0

    I have added all dependencies using the Visual Studio 2010 SP1 option "Add deployable dependencies..." so that should cover everything.

    So if all dependencies can be resolved, how would I go about debugging this issue?

     

  • Lesley 284 posts 143 karma points
    May 02, 2011 @ 17:18
    Lesley
    0

    So have you looked and checked that those files are all in the bin directory? Then I suspect something else may be wrong with your configuration...

    What do you have in web.config for the umbracoDbDSN key (under appSettings)? I think the connection to the database should have been set here by the installer, but maybe the installer didn't even get that far. 

    By the way, you can double-check your permission settings by sneakily skipping ahead a step in the installer: /install/default.aspx?installStep=validatePermissions

     

  • Michiel (NSC) 95 posts 115 karma points
    May 03, 2011 @ 21:53
    Michiel (NSC)
    0

    I created a new Umbraco site from the gallery in WebMatrix to compare the assemblies that are downloaded and installed. It turns out that the Umbraco download from CodePlex contains updated SQL Server CE binaries: v4.0.0.1

    The strange thing is that Visual Studio 2010 SP1 adds v4.0.0.0 binaries when using the new Add deployable dependencies option. 

    Now that I got this solved (thanks Lesley for your help!!) I am left wondering what the exact difference is between the two versions. I have not (yet) found official documentation, but I did read a warning that v4.0.0.1 (which is included in Umbraco) should not be used when deploying to a medium trust environment.

    Not sure if that's the case, but it migh be worth looking into.

    Thanks again!

    EDIT: Just found out that if you look on your computer in Program Files\Microsoft SQL Server Compact Edition that the v4.0.0.0.0 binary (which Visual Studio adds) is in the Desktop folder, whereas the v4.0.0.1 binary (which Umbraco ships) is in the Private folder. Looks like Umbraco is doing the right thing, and Visual Studio is doing the wrong thing by adding the binaries for desktop deployment to a web project.

    EDIT: For further confusion, Orchard CMS ships with the v4.0.0.0.0 assembly of System.Data.SqlServerCe

    EDIT: from this comment on stack overflow (nothing official but a good source generally) it is my understanding that a web application that wants to operate in medium trust should use the binaries from the Desktop folder, just like Visual Studio and Orchard CMS do, but unlike Umbraco does. 

    I have created a work item on CodePlex.

    http://stackoverflow.com/questions/3223359/cant-get-sql-server-compact-3-5-4-to-work-with-asp-net-mvc-2/3223450#3223450

  • Michiel (NSC) 95 posts 115 karma points
    Jun 10, 2011 @ 15:34
    Michiel (NSC)
    0

    Well, it's been 5 weeks since I posted in this thread and since I posted the work item on Codeplex, but nobody picked it up. I have sent an email to Umbraco asking for clarification.

    I was hoping somebody from the development team would at least respond to a new work item to let us know the status.

Please Sign in or register to post replies

Write your reply to:

Draft