Litium Studio as a Web Application Project in Visual Studio
Litium Studio is released as an ASP.NET Web Site. This document describes how to set up and run Litium Studio as an ASP.NET Web Application in Visual Studio.
In Visual Studio you can create Web application projects or Web site projects. Each type of project has advantages and disadvantages, and it is helpful to understand the differences between them in order to select the best project type for your needs.
Prerequisites
• Download and unzip the Litium Studio release package.
• Setup a database and create a “Files”-folder according to the installation instructions.
Convert your website into a web application
1. Start Visual Studio (2012 or later).
2. Create a New Project “ASP.Net Web Application” that uses .NET Framework 4.5.2.
3. In the Visual Studio Solution Explorer, remove all the auto generated files and folders.
4. In Windows Explorer, copy the contents from the deploy folder (containing all Litium Studio files) to the folder you created in step 2.
5. Make the necessary configuration changes in the Web.config file according to the installation instructions.
6. In Visual Studio Solution Explorer, press the button to Show all files.
7.Select the Site and UI folders, and the Default.aspx and Global.asax and web.config files. Right click and in the context menu select Include in project.
8.Right click the website and select convert to web application (In visual studio 2012) or from the project menu in Visual studio 2013. It will prompt a dialog box asking whether its ok to create designer files, click Ok to it.
9.To add references to the assemblies in the bin folder, right click on the References item in the project and select Add Reference.
The references needed by default are shown below. (If you already have your own page types and templates, you may need additional references.)
10. Add the Litium.Studio.Site project source from the installation zip file to the solution folder and add it as an existing project. Fix the references to Litium Studio, add a reference to this project from the web application project and compile it.
The solution should now compile and be able to run as a web application.
Compilation errors
In some situations you might get compilation errors due to following errors:
- Forgetting to add the correct dll reference.
- web.config is not included in the solution
- Visual studio has generated wrong namespace in the designer.cs file: If a class cannot be found correct the namespace reference in the autogenerated file. Note that "PageList" webcontrol may result in a error if its namespace is not "Litium.Foundation.Modules.CMS.WebControls"