Pages

Friday 18 September 2015

Allow anonymous access to SharePoint application pages



We can access the Application page in SharePoint anonymous site.

·         By default, the page is inherited from LayoutsPageBase. Change the inheritance from “LayoutsPageBase” to “UnsecuredLayoutsPageBase”.
·         Next, we need to override a property of the UnsecuredLayoutsPageBase, to allow the anonymous access. Be sure to change the ‘getter’ to return true

protected override bool AllowAnonymousAccess { get { return true; } }

Example :



Reference:


Wednesday 9 September 2015

Office 365 how to build and deploy a web part with sharepoint online



Prerequisites:

1. Visual Studio
2. SharePoint Site
3. Visual Studio 2010 Power Tools
4. Office 365 Site

Note: Please install Visual Studio 2010 Power Tools before starting

Please follow the below Procedure.
Step 1

Run Visual Studio as an Administrator

Step 2

Create a Project using “Empty SharePoint Project” Template

Step 3

Specify the local Share Point site Url(Not o365)

Step 4

Select “Deploy as Sandbox solution”option and click on Finish

Step 5

Now Add Visual Web part(Sandbox) Template

Step 6

Write your code as per the requirement

Step 7

Build the Solution and Test the functionality in Local Site.

Step 8

Package the solution by clicking on “Package” Option.
Right click on solution ->Package

Step 9

Now login into o365 Site as an Administrator

Step 10

click on the solution Gallery
Root site -> Site Actions -> Site Settings -> Galleries -> Solutions

Step 11

Click on Solutions

Step 12

Click on “Upload Solution” and browse the .wsp file that you have created in Visual Studio
take wsp from bin’s Debug/Release Folder of Solution.

Step 13

Click on “Activate” button

Step 14

Create Page and add the web part. Thats it.

Get list template using PowerShell