Copied to clipboard

Flag this post as spam?

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


  • Petri Tuononen 17 posts 37 karma points
    May 18, 2012 @ 11:32
    Petri Tuononen
    0

    Publishing with local SQL Server Compact (.sdf)

    Hello,

    I am a newcomer to Umbraco and currently I have been able to succesfully debug and host Umbraco locally.

    However if I do web deploy either with Visual Studio or Web Matrix, I always get an Umbraco installation page when I browse my domain. I do not want to create a blank database but use the existing one I have modified locally.

    I can see that the Umbraco.sdf file is located in AppData folder on my server.

    I have installed SQL Server Compact from NuGet in Visual Studio. I have installed the same version to the destination server.

    Why Umbraco still wants to create a blank database and how can I force Umbraco to use the existing sdf database file?

    Best,
    Petri

  • Petri Tuononen 17 posts 37 karma points
    May 18, 2012 @ 12:06
    Petri Tuononen
    0

    Fixed.

    I had to add connection string to web.config. Thought it was there by default but I was wrong.

    Here's the code for others:

    <connectionStrings>
      <add name="UmbracoDB" connectionString="Data Source=|DataDirectory|Umbraco.sdf" providerName="System.Data.SqlServerCE.4.0"/>
    </connectionStrings>

Please Sign in or register to post replies

Write your reply to:

Draft