Global Office Directory
More Products
Share this page
Home > Community > Technical Blogs > John West Sitecore Blog > Sitecore MVC Playground Part 1: Enable MVC
I intend this to be the first in a series of blog posts that will help developers start working with and learning the MVC features in version 6.6 and later of the Sitecore ASP.NET web Content Management System (CMS). I based the information in this blog post on an internal build of Sitecore CMS 6.6, which I think should be very close to the beta available towards the end of June and the eventual version release. This blog post repeats some of the information available in the blog post Using Web Forms and MVC in a Single Solution with the Sitecore ASP.NET CMS and the comments on that post. For more information about using MVC with Sitecore, see the blog post Posts about Using MVC with the Sitecore ASP.NET CMS.
Install Sitecore by following the instructions in The Sitecore Installation Guide. I used the setup program and named my instance playground. One thing to beware: on the IIS Web Site page of the installer, click Advanced, and then select .NET Framework Version 4.0. You can use IIS Manager to update the framework version associated with the application pool. If you use the wrong version, you will likely receive the error "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded".
After you install Sitecore, follow these steps to configure the new instance to support MVC:
To confirm MVC is working:
@inherits System.Web.Mvc.WebViewPage
@{
Layout = null;
}
<
html
>
body
h4
>Index.cshtml</
div
>Model:
if (Model == null)
{
text
>null</
else
@Model.GetType();
</
Index.cshtml Model: Sitecore.Mvc.Presentation.RenderingModel
I think that’s all it takes. If anyone follows this process, please comment about whether it worked for you.
Next in this series: Sitecore MVC Playground Part 2: Working without a (Visual Studio Dot) Net
Tags: Architecture, Infrastructure, MVC
- Daryl Macam July 08, 2012 at 4:48 PM
- John West July 09, 2012 at 8:49 AM
- Mike Lopez August 09, 2012 at 11:55 AM
- Joseph Baarsch August 20, 2012 at 11:19 AM
- Sen Gupta November 08, 2012 at 6:06 AM
- John West November 08, 2012 at 9:18 AM
- Jose Marcenaro December 11, 2012 at 8:04 PM
- Sen Gupta December 12, 2012 at 7:27 AM
- John West December 12, 2012 at 11:55 AM
- Anthony Hook December 13, 2012 at 11:08 AM
- Brian Ryther December 18, 2012 at 12:46 PM
- John West December 18, 2012 at 1:21 PM
- Dan Solovay December 27, 2012 at 12:19 PM
- Wesley da Silva January 07, 2013 at 5:31 AM
- Jorge Lusar February 19, 2013 at 3:07 AM
- Borj Ano February 20, 2013 at 4:08 AM
- Borj Ano February 20, 2013 at 6:42 AM
- John West February 20, 2013 at 8:50 AM
- Richard Richard February 25, 2013 at 6:40 PM
- John West February 26, 2013 at 6:54 AM
- Thai Nguyen March 12, 2013 at 3:36 AM
- Deepak Gedia April 10, 2013 at 11:14 PM
- Sen Gupta April 11, 2013 at 7:59 AM
- John West April 11, 2013 at 10:33 AM
John has over ten years of experience in the CMS industry. His areas of focus include the Sitecore community, Web industry research, Sitecore technical documentation, and product management.
This website is designed to be fully functional with scripts disabled in browser. Please contact the webmaster for any suggestions