I was getting access denied error while creating content type policy template in sharepont online. i tried the solution as below to resoleve the issue. let’s disucss how to resolve access denied content type policy templates error. the solution is applicable for the error Access denied uploading template to content type.
Navigate to site settings in sharepoint and click on “content type policy template” to create a custom policy template.
Error “access denied content type policy templates” screenshot as below
Enable below settings in sharepoint admin center.
Allow users to run custom script on personal sites
Allow users to run custom script on self-service created sites
Enable Custom script in site
next step to enable cutom script in site using powershell
This issue usually occurs when a request from an authenticated user without local admin rights results in a failed read of the /BIN directory by the impersonating w3wp.exe (IIS worker process for ASP.NET) process.This behavior is typically associated with lack of permissions to the temporary folder /BIN where ASP.Net assemblies are Just In Time (JIT) compiled.
The solution is to ensure that the Authenticated Users or \Users group (which usually contains DOMAIN\Users group) has Read & Execute, List Folder Contents and Read permissions on the /BIN folder below
Follow the steps below to grant the required permissions:
Open Windows Explorer and navigate to the /bin directory of your web application
Right-click on the folder and click on Properties
Go to Security tab and click on Edit
Click on Add and add the local server group Authenticated Users or \Users (this usually contains DOMAIN\Users group).
Select the Read & Execute, List Folder Contents and Read permissions (if you are planning to add Everyone to the /bin folder, grant Read permissions only)
Click OK to apply the new settings
Refresh the page and we should be able to browse to the site.
If an administrator accesses the site/feature that caused the error, the subsequent requests from non-administrators would succeed. This behavior is typically associated with lack of permissions to the temporary folder where ASP.Net assemblies are Just In Time compiled.
The freb trace shows a 403.0 for ManagedPipelineHandler
It seems to go through quite a few ASPNet events – but happens during the ASPNetPageRender – it goes to the ASPNetPageRender Enter, then ASPNetHTTPHandler Leave.Only then does it get a 403.0 which is not an official RFC error. The first sub-status for 403 is 403.0.
Application pool in Classic or Integrated mode
Application Pool in Classic Mode – In this case, we can configure a Wildcard mapping for ASPNET_ISAPI.dll at the website level. That would propagate to child virtual directories. That should not need any further modifications at the virtual directory level.
Application Pool in Integrated Mode – In this case, all relevant virtual directories would need individual modifications. They need to be set for specific handler.
Set maximum number of site collections per content database
For Particular Requirement, client want to dedicate a database for a single site collection. When we create a site collection from central admin, site is placed automatically in any available content database. To prevent any other sites to be created on the particular content database, We can set maximum number of site collections on particular content database. Follow steps below :
Central Administration -> Application Management -> Management Content databases
Select our target web application in which the particular content database is attached
Pick the target database from the list
Now, in the “Manage Content Database Settings” page we can set the maximum number of sites for the content database.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Variables for processing
$WarningSiteCount = 0
#Get all content databases of the web application
$ContentDBColl = Get-SPContentDatabase -webapplication $WebAppURL
#Iterate through each database in the web application
foreach($Database in $ContentDBColl)
#Check the current No. of sites
if($MaxSiteCount -ge $Database.CurrentSiteCount)
#Set Maximum Sites, warning level Counts
Set-SPContentDatabase -Identity $Database.Name -MaxSiteCount $MaxSiteCount -WarningSiteCount $WarningSiteCount
Write-host "Max Sites Settings updated for the database:" $Database.name -ForegroundColor Green
write-host "MaxSiteCount must be > = current site count! No changes made in $($Database.Name)" -ForegroundColor Red
SharePoint search result not found from specific document library
I came across a situation where user is trying to search documents selecting the option "search in same site" instead of "all sites" from search box and getting no result where as can find documents from other library with in same site. SharePoint search result not found from specific document library
Why such happens ?
The first point comes to mind for search error is content not crawled, indexing not done for this situation.
Yes , its true but we need to think why ?
As per my investigation I found the setting of the library as below
By default SharePoint only crawls major versions of files and draft items are only viewable by their creators. SharePoint is behaving as expected out of box.Draft items are not crawled in SharePoint
This behavior can be altered in Document Library Settings -> Versioning Settings -> Draft Item Security
Select the option "Any user who can read items".
This will allow all users to see draft items including the crawling account.
* Else you need to select "Create major versions" option or can publish the documents as major versions if want to get those documents in search result as per client wish.
You can use the following Display template SharePoint to change the appearance of content that is shown in a Content Search Web Part. These display template files are located in the Content Web Parts subfolder in the Display Templates folder in the Master Page Gallery.
Display templates for the Refinement Web Part and the Taxonomy Refinement Web Part
You can use the display templates listed in the following table to change the appearance of content that is shown in a Refinement Web Part and a Taxonomy Refinement Web Part. These display template files are located in the Filters subfolder in the Display Templates folder in the Master Page Gallery. Note that there are different display templates for different refiner types.
Display templates for the Search Results Web Part
You can use the display templates in the following table to change the appearance of content shown in a Search Results Web Part. Note that the hover panels for the different result types have separate display templates. These display template files are located in the Search subfolder in the Display Templates folder in the Master Page Gallery.