ASP.NET MVC 4 AllowAnonymous Attribute and Authorize Attribute
Free Website Database - SQL Server Compact Edition
I mentioned earlier how Orchard CMS has the option of using the new SQL Server CE 4 by Microsoft as a free database solution for small websites. This avoids the extra cost of purchasing a 50MB or so instance of SQL Server in your shared hosting environment. It is important to point out that SQL Server CE is not used just with Orchard. Once you install Visual Studio 2010 SP1 and the new Visual Studio SQL Server CE Tools, you can create a database for ASP.NET Web Pages, ASP.NET MVC, or ASP.NET WebForms.
The new SQL Server CE Tooling that supports Visual Studio 2010 SP1 will allow you to add a new SQL Server CE 4 Database as simply as Add New Item. You can place the database in your App_Data Folder and now you have a free database solution for inexpensive shared hosting websites:

One of the nice things about going with SQL Server Compact Edition is not only that it is free, but if your website outgrows the database you can migrate it to SQL Server Express very easily. Even the free development tool, WebMatrix, has a simple Migrate Wizard that will handle the migration from SQL Server CE to SQL Server Express for you automatically.
And, if you are not an experienced Visual Studio Developer and don't have Visual Studio to manage, edit, and create new tables and data for SQL Server CE, WebMatrix will do that for you easily. Of course, you still need knowledge of databases to pull all that off.
The nice thing about going with Orchard CMS for your affordable website is that it will create and manage your free SQL Server CE database for you. When installing Orchard and running Orchard for the first time, it will ask you if you want to use a local SQL Server Compact Database or an existing SQL Server Database. If you choose to use SQL Server CE, it will automatically create if for you.
Each Orchard Module you install will automatically create the necessary tables in the database as part of the enabling process. As new features are added to each module the updating process will take care of any database changes for you. It is the job of the Orchard CMS Developer to make all of this transparent to you by creating the necessary datamigration file that handles the evolution of the database tables. It really is a beautiful thing!
The keys to this post are this. First, SQL Server Compact Edition is more than just for Orchard CMS. You can use it for any light usage website. Second, SQL Server CE is a free database solution to help keep your website and shared hosting as inexpensive as possible. Third, there are free tools, like WebMatrix, to help with managing your SQL Server Compact Database. Fourth, you can easily migrate to SQL Server Express from SQL Server CE and even the free tool, WebMatrix, will take you through the steps. And last, Orchard CMS has built-in support for SQL Server Compact and will handle the creation and management of the database for you.
If this sounds great to you, let us quickly create you an affordable website using Orchard CMS today. You will be amazed how quickly we can get you up and running. Contact us for a free consultation.


