Just “quick and dirty” public static void ChangePermissions(SPSecurableObject subject, SPPrincipal principal, SPRoleType roleType) {     SPRoleDefinition roleDefinition = null;     SPRoleAssignment roleAssignment = subject.RoleAssignments.GetAssignmentByPrincipal(principal);     if (roleAssignment != null && subject != null)     {         switch (subject.GetType().Name)         {             case “SPList”:                 if (!((SPList)subject).HasUniqueRoleAssignments)                     ((SPList)subject).BreakRoleInheritance(true,false);                 roleDefinition = ((SPList)subject).ParentWeb.RoleDefinitions.GetByType(roleType);                 break;            

Read More
Change SharePoint group permissions from code

In my previous blog, we have installed Windows Server 2012 R2. Now, in this blog, I’ll show you how you can install Active Directory with Domain Controller in Windows Server 2012 R2. Kindly follow the below mentioned steps to install AD. SharePoint 2013 Installation Series: Part 1 – Step by step Installation of Windows Server 2012

Read More
Step by step installation of Active Directory Domain Services in Windows Server 2012 R2 (Part 2)

In this blog, I’ll walk you step by step through the installation of SharePoint 2013 on Windows Server 2012 R2. Before going ahead in detail, Let’s quickly check out the Hardware and Software requirements for SharePoint 2013 installation. You can click here to understand the complete System requirements for this installation. Based on my Installation experience with

Read More
Step by step Installation of SharePoint 2013 on Windows Server 2012 R2 part 1

            \\ This example delete all nodes of Navigation.QuickLaunch            \\constructor of the client context: requires an input parameter             using (var context = new ClientContext(siteUrl))             {                                \\quicklaunch of the object web                  NavigationNodeCollection nodes = context.Web.Navigation.QuickLaunch;                 context.Load(nodes);                 context.ExecuteQuery();                 \\linq to cycle the nodes of

Read More
SharePoint client library: QuickLaunch

If you happen to stumble upon this problem: “WSS PROXY USAGE APPLICATION STOPPED” follow this procedure: Read id proxy services: launch from management shell: Get-SPServiceApplicationProxy Take the id of the service WSS Usage Application proxies (example: 97b0f809-cf86-4740-9e4f-61edf9a40d93) Execute the commands listed below (together): $UsageApp = Get-SPServiceApplicationProxy | Where {$_.ID -eq ” 97b0f809-cf86-4740-9e4f-61edf9a40d93 “} $UsageApp.Provision()  

Read More
How to fix ‘WSS Usage Application Proxy Stopped’ with Powershell

The following example reads specific properties of a website. try {      string siteUrl = “http://server/SiteCol”;      //The constructor ClientContext requires a url      using(ClientContext clientContext = new ClientContext(siteUrl))     {          Web website = clientContext.Web;        //retrieves the title and site Created           clientContext.Load(  

Read More
How to read a SharePoint Website Property using CSOM

Often after building a website, I am required to change the title.  Here is an example of how to update the Title and Description of a website using CSOM. string siteUrl = “http://MyServer/sites/MySiteCollection”; //Costruttore using (ClientContext clientContext = new ClientContext(siteUrl)) {           //change title and description of siteUrl            Web website =

Read More
How to change the Title and Description of a SharePoint Site using CSOM

Hello Everyone, In this blog, I’ll show you how you can easily installation SharePoint 2010 on Windows Server 2008. Before going ahead, Kindly verify few things on your machine 1. You have done installation of Microsoft SQL Server 2008/2012 R2 on your Machine. 2. You have done installed and configured Active Directory Domain Server on

Read More
Step by step Installation of SharePoint 2010 on Windows Server 2008 R2