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;
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
if we want to work with the quicklaunch we must first know how to read its nodes: //constractor for client context using (ClientContext clientContext = new ClientContext(siteUrl)) { using(Web web = clientContext.Web) { NavigationNodeCollection quickLaunchNodeColl = web.Navigation.QuickLaunch;
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
\\ 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
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()
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(
This post illustrates how to create a new SharePoint Site based on custom template using Web API. Required parameters: contextUrl, url, title, Webtemplate Where: contextUrl = https://server.sharepoint.com url = mysite Webtemplate = STS#0 var requestUri = contextUrl + ‘/_api/web/webs/add’; return $.ajax({ url: requestUri, type: “POST”, data: “{ ‘parameters’: { ‘__metadata’: { ‘type’:
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 =
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
Page [tcb_pagination_current_page] of [tcb_pagination_total_pages]