Deploy LightSwitch Application as DotNetNuke Module


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 your LightSwitch applications in DotNetNuke you will need DotNetNuke 5 (using ASP.NET 4.0).

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

image1.png

Step 2 : Create a table such as Task.

image2.png

Step 3 : Now we will add a screen. Right click on screens->Add screen.

2nd1.png

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

2nd.png

Step 5 : Click on write code->Select Task_Created.

image3.png

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".

Step 6 : Go to properties in the Solution Eexplorer.

image4.png

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

image5.png

Step 8 : Now click on application type-> select Host application services on IIS.

image6.png

Step 9 : Go to configuration manager in debug.

image7.png

Step 10 : Select release mode in debug.

image8.png

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

image9.png

Step 12 : Click on publish for publish your application.

image10.png

Step 13 : Run application (Press F5). Now you can create task in DotNetNuke framework.

last.png


Similar Articles