Skip to main content
 
Go Search
Home
Categories
Bloggers
Blocking SharePoint Designer
By: Daniel Herzog | Posted: March 30, 2010 at 9:00 PM
 

Since the advent of free SharePoint Designer (SPD) downloads, many of us have wondered how to block users from using SPD on some SharePoint sites.  While this may fly in the face of empowering your users, there are some (maybe a lot?) of sites that you just don't want anyone to mess with.  SPD can be a powerful tool, and in the wrong hands it can lead to way too many support tickets and site admin headaches.

 

If you've been lucky enough to get to try to resolve this, you've no doubt already read the guidance from the SPD Team at MS, and if you're anything like me you found the solutions it presents less than perfect for your scenario. 

 

Luckily there's another solution available to SharePoint developers that's making its way around the web, with a great example found on CodePlex by iwkid.  Basically there's a property that can be set in an SPWeb property bag, and that will block SPD from accessing your site. 

 

The critical lines of code are:

 

spWeb.AllProperties.Add("vti_disablewebdesignfeatures2", "wdfopensite");

spWeb.Update();

 

I'll spare you all the implementation details - suffice it to say just get a handle on an SPWeb object, set the property, then update the SPWeb object.  You can use what's in the CodePlex solution or you can use this code sample to roll your own.  You can create a utility exe to run thru your entire site collection, create an administration web part to turn SPD access on or off to a particular site (or a bunch of sites at once), or like in the CodePlex example create a Site Feature that can be turned on or off.  Or anything else you can do in code - options are endless.

 

This solution was a life saver, and has worked out very nicely.  We decided to implement it as a Site Feature - using the CodePlex solution as a starting point - allowing site admins to decide whether to grant or deny access.  So far so good, we have not noticed any impact on any other functionality - InfoPath forms still work, which was the downfall of a previous solution we had tried.

 

Another thing I love about this solution - SPD gives a friendly little message to the user when they try to open a blocked site:

"The web site has been configured to disallow editing with SharePoint Designer.  Contact your web site administrator for more information."

 

Nice.


  Comments   Add Comment   Share It  
  Your Name:
  Your Email: **will not be displayed
  Comment Title:
* Comments:
  If you cannot read the code, please
click here to get a new one. You won't
lose your comments by doing so.
* Security Code:
   
  
  
* Your Name:
* Your Email: **will not be displayed
* Recipient's Email:
* Subject:
  If you cannot read the code, please
click here to get a new one. You won't
lose your comments by doing so.
* Security Code:
  
  
  
Hold yourself responsible for a higher standard than anyone else expects of you. Never excuse yourself. Thank You. . . Said by <a href="http://www.obwatches.com/">Breitling Watches</a>.<br>
By: Blova Accutron | Posted: August 20, 2010 at 7:11 PM
Hold yourself responsible for a higher standard than anyone else expects of you. Never excuse yourself. Thank You. . . Said by <a href="http://www.obwatches.com/">Breitling Watches</a>.<br>
I got to this article from an other blog, there is actually some good points on this post, many thanks!
By: creative recreation | Posted: July 8, 2010 at 2:00 AM
I got to this article from an other blog, there is actually some good points on this post, many thanks!
The same in SharePoint 2010
By: Half | Posted: April 16, 2010 at 11:02 AM
I blogged on how to perform the same operation via UI in SharePoint plus quoted someone about the security aspects of such feature. Check here: http://wp.me/pTfJA-7
 

 About Dan Herzog

Managing ConsultantDan Herzog is a managing consultant with more than six years experience designing and developing advanced software systems. He has done most of his work with collaboration technologies including Micro... [more]

 ‭(Hidden)‬ Admin Links

 External Links

 Tag Cloud