How to deploy a Application Page to Central Administration…!


I had a requirement to create a settings page to configure few operations globally in SharePoint. So I was looking into creating a settings page in Central Administration. I have pointed out below the basic steps to do that.

Step 01:
Create an empty SharePoint project.

Step 02:
Add a mapped folder to Central Admin application pages.

image

image

Step 03:
Select the Admin mapped folder and add a new application page to the project.

Note: This will create a new application page for you, but it will be created in a separate mapped folder named Layouts (Default behavior for creating application pages in Visual Studio 2010). You will need to drag the newly created folder with the file to the admin mapped folder and then you can delete the Layouts mapped folder.

imageimage

(Before move)                                               (After move)

Above steps will deploy the new page to the 14 hive folder, but we need to add a link to navigate to the page. To create that you need to create a Custom Action.

Step 04:
Adding a Custom Action can be done in two different ways.

1) Procedure 01:
Add a new Module element to the solution and remove the sample.txt file automatically created for you.

Edit the element.xml file and add the custom action group and custom action configuration as necessary.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomActionGroup
    Id="CustomApplicationSettingsGroup"
    Title="Custom Application Settings"
    Description="Can configure custom application settings from here."
    Location="Microsoft.SharePoint.Administration.GeneralApplicationSettings"
    Sequence="1000"  />

  <CustomAction
  Id="AppSettingsPageLink"
  Title="Show Application Settings Page (Created from CSK Template)"
  Description="Options to configure application settings."
  Location="Microsoft.SharePoint.Administration.GeneralApplicationSettings"
  GroupId="CustomApplicationSettingsGroup"
  Sequence="1000">
    <UrlAction Url="_admin/DeployApplicationPageToCA/ApplicationSettingsPage.aspx"/>
  </CustomAction>
</Elements>

2) Procedure 02:
If you have installed CSK Development Tools Visual Studio extension, you can use the

image

in build item template to create a Custom Action Group and a Custom Action.

image

Using this CSK template will provide you a wizard to configure and setup the Custom Action.

image

(First step in the wizard for creating a Custom Action)

Your solution will be looking like this after adding the Custom Action (In this screen I have added two Custom Actions to the solution using the above two different approach)

image
Step 05:

Create a new Feature and add the newly created Custom Action related items to the feature. Leave the Feature Scope to be Web.

Step 06:

Deploy your solution and check the Central Administration for the newly created Application Page.

image

image

You can include a nice icon and all in the Custom Action Group settings. Smile

One thought on “How to deploy a Application Page to Central Administration…!

  1. Pingback: Application Page deployed to Central Admin does not show - FAQs System

Leave a comment