Posts

Showing posts with the label SharePoint

SharePoint Custom Access Denied Page

Creating a custom Access Denied page to match the site branding and client requirement is one of the requirement in most of the projects. In Microsoft SharePoint, it has a default Acess denied page. To customize and build our own Acess Denied page, follow the below steps. On the SharePoint server, navigate to : C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\LAYOUTS Create new folder: UserCustomPages From the /Layouts folder, copy AccessSenied.aspx file paste into the new folder(UserCustomPages). Rename the file to customAccessDenied.aspx and modify it as per the requirement, save it. Open SharePoint management shell Execute below scripts: get-spcustomlayoutspage -webapplication "http://your-site-url" This will show the default Access denied page used. set-spcustomlayoutspage -Identity "AccessDenied" -RelativePath "/_layouts/15/UserCustomPages/customAccessDenied.aspx" -webapplication "http://your-site-url" Thi...

Create SharePoint Site Collection in a specific Content DB In SharePoint using PowerShell

As the SharePoint Central Administration doesn’t provide any interface to create a site collection with a nominated content database, we need to use PowerShell commands to create a site collection in a new content database for SharePoint on-premise. #Create a SharePoint New Content Database New-SPContentDatabase -name <<WSS_Content_DB_Name>> -webapplication <<http://Web_App_URL>> Create Site Collection in the previously created Content DB #Create a Site collection in the specific content database New-SPSite -Name "<<Site_Collection_name>>" -ContentDatabase <<WSS_Content_DB_Name>> -url <<Site_Collection_URL>> -OwnerAlias "domain\primary_Admin" -SecondaryOwnerAlias "domain\Secondary_admin" -Template "BLANKINTERNET#0" Here the template is the required site collection template. Some of the common template codes are below: Team Site: STS#0 Blank Site: STS#1 Wiki Site: WIKI#0 Blog: BLOG#0 App...

SharePoint Get list items from List view- REST API

In the below code snippet, call the  getListViewItems method by passing the weburl, list title and the viewname. function   executeJson ( url ,  method ,  headers ,  payload ) {      method  =  method  ||  'GET' ;      headers  =  headers  || {};      headers [ "Accept" ] =  "application/json;odata=verbose" ;      if  ( method  ==  "POST" ) {          headers [ "X-RequestDigest" ] =  $ ( "#__REQUESTDIGEST" ). val ();     }      var   ajaxOptions  = {          url :   url ,          type :   method ,          contentType :   "application/json;odata=verbose" ,   ...

Nintex Workflow publish error: System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file

Image
When publishing the Nintex Workflow on SharePoint On-prem, we might get following error: soap:ServerServer was unable to process request. ---> Failed to publish workflow: <Error><CompilerError Line="-1" Column="-1" Text="Type System.CodeDom.CodeTypeReferenceExpression is not marked as authorized in the application configuration file." Solution: As per the Microsoft Docs, below is the solution: Workflow Foundation (WF) will only run workflows when all the dependent types and assemblies are authorized in the .NET config file (or added explicitly via code) under this tree: <configuration> <System.Workflow.ComponentModel.WorkflowCompiler> <authorizedTypes> <targetFx> However, after the update, the following lines are necessary for SharePoint 2013 and beyond: <authorizedType Assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" NameSpace=...

SharePoint site collection backup restore with Nintex Forms and Nintex workflows

If you are using the Microsoft SharePoint on-prem with Nintex Forms and Nintex Workflows, there might be a question on how to move the site with forms and workflows to Client environment Or from dev/test/staging environment to the test/production environment. Here are some of the ways and highlights which i hope will help you. If you are planning to move only the Lists- which are having Nintex Forms, then there are few aspects to be considered: If you have only few lists, then you can use List template (.stp) and restore it on the destination environment. This will also have the Nintex forms along with it. However, if you have many Lookup columns in your List, then once you create the List using List template, the lookup column references will be lost. you need to delete all lookup columns and re-create. Moving Nintex forms for already created lists, You can export the Nintex Form xml file and restore it. If you want to move the Workflows, then export the Nintex workflow files (.nwf) f...

SHAREPOINT PERMISSIONS

Image
SharePoint Site Architecture We assume you have some familiarity with SharePoint, however, this is the very basic knowledge we need to ensure you have before moving forward. SharePoint sites start with a site collection and the content of the site collection can be depicted in the diagram below. A site collection is the top level of object that holds all the sites content. The objects under a site collection are stored hierarchically. Many sites can be created under the site collection. Sites can hold other sites, libraries, and lists. A document library is a type of list that holds documents. No sites can go under a list. A document resides under a document library. It is also an “item” of that document library. Nothing can go under an item. Just like document libraries, lists are a content holder for data items . For example, announcements are a type of list that holds announcements. Contacts is another type of list that can hold contacts. SharePoint Permi...