Visual Studio LightSwitch is a Microsoft tool used for building business applications. If you want your LightSwitch application to be deployed as a DotNetNuke then you can.

DotNetNuke is the leading Web Content Management Platform for Microsoft .NET, powering more than 700,000 web sites worldwide. Whether you need a content management system (CMS) for your personal web site or for a Fortune 500 company, DotNetNuke has a solution that fits your needs. For details of DotNetNuke, please visit this link:
http://www.dotnetnuke.com/

Before deploying yourLightSwitch applications inDotNetNuke you will need at least DotNetNuke 5 (using ASP.NET 4.0). Or you can use the newest DotNetNuke 6.


1. Open Visual Studio LightSwitch->Create new table.


2. Create a table such as Task.




3. Then, right click on Screen
à Add Screen.



4. Select list and details screen->Select screen data (Task)->Ok.




5. Click on write code
à Select Task_Created.



Code

using System;

 using System.Collections.Generic;using System.Linq;
 using System.Text;
 using Microsoft.LightSwitch;
 namespace LightSwitchApplication
 {
     public partial class Task
     {
         partial void Task_Created()
         {
             this.UserName = this.Application.User.Name;
         }
     }
 }


Description
: This code set the Username field to the "Application.User.Name".

6. Go to properties in the Solution Explorer.



7. Click on access control-> select Use Forms authentication




8. Click on application type-> select Host application services on IIS




9. Go to configuration manager in debug.




10. Select release mode in debug.




11. Go to build in menu bar->Publish your application (DotNetNuke).




12. Click on publish for publish your application.




13. Run your application (Press F5).