Copied to clipboard

Flag this post as spam?

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


  • Lars 66 posts 136 karma points
    Jun 09, 2015 @ 09:28
    Lars
    0

    Lost remote connection string to a CE database

    Hi. I am working on a Umbraco 7 website. I am using a CE database at the website (remote) but I was stupid enough to overwrite the web.config file with my local web.config without having a backup.

    Now does someone know where I can replace code in order to make a connection to my remote database. On my local edition I have a connection to an SQL Server Management database. Below I put the part of the web.config file that I think is the part that I will have to change.

    Any help highly appreciated since it could most probally save me for a couple of hours of working :-).

    // Lars

    <connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="Server=localhost;Database=Salsabonito2015;Integrated Security=true" providerName="System.Data.SqlClient" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
      </connectionStrings>
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.4.0" />
          <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe" />
          <remove invariant="MySql.Data.MySqlClient" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
        </DbProviderFactories>
      </system.data>
  • Lars 66 posts 136 karma points
    Jun 09, 2015 @ 12:38
    Lars
    0

    Problem sloved, I replaced the connectionString like below

       <remove name="umbracoDbDSN" />
    <!--    <add name="umbracoDbDSN" connectionString="Server=localhost;Database=Salsabonito2015;Integrated Security=true" providerName="System.Data.SqlClient" />-->
        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
      </connectionStrings>


Please Sign in or register to post replies

Write your reply to:

Draft