SharePoint 2013 | How to Create Contributor without Delete rights


The standard SharePoint installation comes with 7 default permissions level:

Full Control Design Edit Contribute Read Limited Access View Only

In some cases, developer may need to allow contribution without deletion rights.

So how do we do it?

So lets create Limited Contribute, permission for contribution without deletion rights using following steps.

Open Site Settings, followed by Site Permission On the Site Permission page, click on Permission Levels On the Permission Levels page, click on Add a Permission Level Enter details of the New Permission Level, and remove Delete Items and Delete Versions from the permission details. Click Create



Related Posts:[read more...]

SharePoint: Writing Custom Web Service for SharePoint in Supported Mode (part-2)


Before we continue, I suggest you read the first part here ; it gives basic idea of how it works. The purpose of part-2 is to make real implementation of Custom Web Service , but it is not the only way to do it. There are some key points that I want to show here:

We will put our custom Web Services in a Custom folder under _vti_bin. In this case we will create new folder WSCustom under (12hive/ISAPI for SharePoint 2007 or 14hive/ISAPI for SharePoint 2010) We will need a helper to read SharePoint context (SPVirtualPath) before passing the request to the real ASMX. In this case we will copy WSDISCO.ASPX and WSWSDL.ASPX from original _VTI_BIN to _VTI_BIN/WSCustom [read more...]

SharePoint: Writing Custom Web Service for SharePoint in Supported Mode (part-1)


If you have read my comments on the Writing Custom Web Service for SharePont, Is it supported here ( ; you may have already created standard ASPNET web services. It is working, but with some limitation:

You can not have path virtualization

Virtualization is one of SharePoint’s technique provided by SPVirtualPath provider, that enable virtualization of your web service path. For example, list.asmx will be available for , or The site collection has been virtualized by SharePoint.

Without virtualization any web service consumer will have to access to the same path, usually in the root; for example /_services/mywebservice.asmx">/_services/mywebservice.asmx">http://<webapps>/_services/mywebservice.asmx

You can not have SPContext

SPContext is very powerful object [read more...]

PowerShell : Compress files with Windows an improved version


When I am looking for a way to compress file(s) into Zip, I find a blog from David Aiken here (Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget) . I will just focus on Add-Zip function and nothing more.

Here is the original code:


function Add-Zip { param([string]$zipfilename) if(-not (test-path($zipfilename))) { set-content $zipfilename ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18)) (dir $zipfilename).IsReadOnly = $false } $shellApplication = new-object -com shell.application $zipPackage = $shellApplication.NameSpace($zipfilename) foreach($file in $input) { $zipPackage.CopyHere($file.FullName) Start-sleep -milliseconds 500 } } usage: dir c:\demo\files\*.* -Recurse | add-Zip c:\demo\

I am raising two problems with the code:

1. Looking at the usage example, it is clear that the function [read more...]