PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/setup/SQL_CE/ReadMe.txt

#
Plain Text | 94 lines | 71 code | 23 blank | 0 comment | 0 complexity | a375d4d7dcf5fa0668e6c8aa7b027f58 MD5 | raw file
 1Running BlogEngine.NET using SQL CE 4.0
 2
 3If you wish to use SQL CE to store all your blog data, this folder has all the information you'll 
 4likely need.  The BlogEngine.sdf is already setup with the DB tables and initial data needed
 5to get started with BlogEngine.NET.  Although not needed, SQL_CE_Setup_2.9.sql is provided
 6for reference.  This was the setup script used to create the BlogEngine.sdf file.
 7
 8Instructions for New Setup
 9-----------------------------------------------------------
101. When running BlogEngine.NET under SQL CE 4.0, you will either need SQL CE 4.0 installed on 
11your computer, or if deploying to a webhost, you can simply copy the SQL CE 4.0 binary (DLL) 
12files to your /BIN directory.  The DLL files will be located in the installation folder for SQL 
13CE 4.0.  The installation folder is located at:
14
15%ProgramFiles(x86)%\Microsoft SQL Server Compact Edition\v4.0\Private
16
17If you do not have SQL CE 4.0 installed on your computer, or you need the DLL files, the latest 
18CTP version of SQL CE 4.0 can be downloaded at:
19http://www.microsoft.com/download/en/details.aspx?id=17876
20
21However, please check for the latest version of SQL CE 4.0 before downloading the one at the 
22above link.
23
242. Copy the following files/folders to your /BIN directory.  The files are located in the SQL CE 
254.0 installation folder:
26
27%ProgramFiles(x86)%\Microsoft SQL Server Compact Edition\v4.0\Private
28
29 (a) Copy the file "System.Data.SqlServerCe.dll" into your /BIN directory.
30 (b) There are two sub-folders: AMD64 and X86.  Copy both folders to your /BIN directory.
31
32After copying these files and folders, your /BIN directory will look like this:
33
34/bin
35   System.Data.SqlServerCe.dll
36/bin/x86
37   sqlceca40.dll 
38   sqlcecompact40.dll 
39   sqlceer40EN.dll 
40   sqlceme40.dll 
41   sqlceqp40.dll 
42   sqlcese40.dll 
43/bin/amd64 
44   sqlceca40.dll 
45   sqlcecompact40.dll 
46   sqlceer40EN.dll 
47   sqlceme40.dll 
48   sqlceqp40.dll 
49   sqlcese40.dll 
50
513. Rename the SQL_CE_Web.Config file to web.config and copy it to your blog's root 
52folder.  (This will overwrite your existing web.config file.  If this is not a new installation, 
53make sure you have a backup.)
544. Copy the BlogEngine.sdf file into the App_Data folder.
555. Surf out to your Blog and see the welcome post.
566. Login with the username admin and password admin.  Change the password.
57
58Upgrading from 2.6
59-----------------------------------------------------------
60
61 - Run SQL_CE_UpgradeFrom2.6to3.0.sql against your existing CE database. It will add new table and index.
62   If you get an error with "GO" keyword not supported, run statements one by one excluding "; GO".
63
64Upgrading from 2.5
65-----------------------------------------------------------
66
67There is an upgrade script to update your SDF file so it is compliant with BlogEngine.NET 2.7.
68The upgrade script name is SQL_CE_UpgradeFrom2.5to2.6.sql.  This script will need to be
69run against your BlogEngine.NET 2.5 SDF file.  A recommended tool is to use the
70SQL Server Compact Toolbox utility found at:
71
72http://sqlcetoolbox.codeplex.com/
73
74An add-in for Visual Studio 2010/2012 can be downloaded, or a standalone version of the toolbox
75can be downloaded.  This utility will allow you to run a SQL CE script against a SDF
76file.  You would want to run the script contained in SQL_CE_UpgradeFrom2.5to2.6.sql
77against your BlogEngine.NET 2.5 SDF file.  Once the script has been run, your BlogEngine.SDF
78file will be ready to use in a BlogEngine.NET 2.5 website.
79
80Additionally, the web.config file has changed from 2.5 to 2.7.  It will likely be easiest to start
81with the sample web.config file as described above, but if you have other changes in it, 
82you'll need to merge them.  Don't forget to move your connectionString over.
83
84Troubleshooting
85-----------------------------------------------------------
86If you use one of the sample web.config files, are running your site on your own machine or a 
87server that SQL CE 4.0 is already installed on, and you receive the following error message 
88when starting the site:
89
90"Failed to find or load the registered .Net Framework Data Provider."
91
92In this scenario, you may need to remove the <system.data> section out of the web.config file.
93
94