Composite Applications, Events, MOSS 2007, WSS V3, PowerShell, SharePoint Designer 2007, Workflow, General, Stuff, Check This Out!, Dear Product Team..., Fun and Games, TweakSP, Silverlight, Me, Mobile, InfoPath 2007, Site Definitions, Windows 7 |
|
|
4/15/2009While doing the initial R&D for blocking SharePoint Designer access, Brian and I discovered something else that is kind of fun. Since we now know that you can block SPD access by setting a value in an SPWeb’s PropertyBag, and we also know how to modify PropertyBag variables in SPD, the next logical step is to use SharePoint Designer to DISABLE access to a web using SharePoint Designer. * Again, this is just for fun. Once you disable access via SPD you obviously can’t get in and undo your change. There also isn’t an out of the box way to modify PropertyBag values through SharePoint’s Web UI so you’d be stuck having to use PowerShell or some other method to undo this silly change. * -
Open your Web in SharePoint Designer
-
Choose Site Settings from the Site menu:  -
On the Parameters tab, add a new parameter named “vti_disablewebdesignfeatures2” with a value of “wdfopensite”. -
Close SharePoint Designer (you must close all the way out, the Open Service method’s response is cached by SPD and won’t change until you come restart SPD)
-
Attempt to open the site again: And there you have it! :-) 4/14/2009Late last week Brian Caauwe and I spent some time looking into how to lock down SharePoint Designer access. One of the first options that is available is to modify a Site Definition’s ONET.xml file. All of the instructions are available here (thanks to the SharePoint Designer Team!) so I’m not going to walk through each step – the main thing to note is that we’re updating the Project element to include a new attribute, “DisableWebDesignFeatures” which you can see here: Once the new attribute is in place (and IIS is reset), any attempt to open the site in SharePoint Designer gives you a very friendly error message: What is great is that if you update the Site Definition and remove the “DisableWebDesignFeatures” attribute (and reset IIS), the site will open in SharePoint Designer just fine. I did not think that was the case so I was pretty interested to see what exactly was going on behind the scenes. So how does SharePoint Designer know when it is ok to open? To find that answer we can turn to our best friend, Fiddler. By using Fiddler while we attempt to open a site with SharePoint Designer, we can see that a number of RPC calls are made: The third RPC call (the one to author.dll) is the one we’re most interested in: it calls the Open Service FPRPC method. The response we get is almost 3kb of ALMOST-html garble (thanks again, Vermeer). Hidden in the response is a familiar attribute with a new name – vti_disablewebdesignfeatures2 with a value of wdfopensite: If we were to remove the attribute from our ONET.xml file and then reset IIS, the attribute also goes away from our Open Service request. Here’s where Brian stepped in with the best idea ever – can we possibly set the same variable in an SPWeb’s PropertyBag? I thought he was crazy but, as is frequently the case when I question Caauwe, I was wrong! First I opened up PowerShell and looked at the properties stored in an SPWeb’s PropertyBag: From there I added a new property matching the existing “vti_” pattern, using the property name we found in the Open Service method’s response: and now, without an IIS reset, I get our friendly error message stating that access via SharePoint Designer has been disabled: Brian and I used this new found knowledge to create a new release for the NoSPD Codeplex project that wraps this functionality into a feature. Check it out here! 4/13/2009It has been a busy month but I’ve also changed where I spend my time lately... late last year, instead of focusing my attention on the blogosphere I changed my focus to Facebook. I was really enjoying the number of leads I got on breaking SharePoint news just from Facebook so I stopped reading (and then, writing blogs). Then... Facebook changed their interface and it made it easy for me to be coerced into trying Twitter (via TweetDeck). Since then, I’ve been hooked! If there is a blog I need to read, someone tweets it… otherwise, it must not be important, right? WRONG. I’ve learned a lot about twitter over the last month or so but the biggest thing is that not all blogs of value get mentioned on Twitter and there is a lot of required reading that I’ve been missing out on. That said, what if everyone else is doing the same thing and relying on Twitter for all the goods? The answer is that I have to start sharing my time between the blogosphere and the many social channels available to me again. I also need to start BLOGGING again! I have lots to say and I just can’t do it in 140 or less! Look for more blog posts soon and if you haven’t heard from me on here for a few days, please hop on Twitter and tell me to get back to work writing posts!! It has been a crazy month! Way back on the 2nd it was officially announced that SharePoint Designer was going to be free. Since then, things haven’t really slowed down! Last week I was able to speak after the Minnesota SharePoint User Group, giving a quick “what you need to know now that SPD is free” talk. Before that talk I really wanted to turn on a website for an idea I had: http://www.LearnSPD.com. I worked with my buddy Kris (of http://www.BrandingSharePoint.com fame) to get a design put together and some initial content out there. Now that the base is out there, we plan to do some FREE webcasts on SharePoint Designer and then make them available on the site later this month! Outside of my http://www.LearnSPD.com efforts, I also joined the NoSPD codeplex project at http://NoSPD.codeplex.com. The goal of the project is to provide easy ways for administrators to disable users’ access to SharePoint Designer until proper governance can be put into place. After a little R&D with my coworker Brian, we came up with an alternative solution to the SharePoint Designer dilemma (more details here). We added a new release to the solution (available here) and are in talks on how to take the project to the next level! Next on my list? MOSS Camp, St. Louis on the 18th! I’ll be presenting a session on the Data Form Web Part! I’m really looking forward to it – I have presented once at the St. Louis SharePoint User Group and I’m looking forward to another chance to meet up with the SharePoint St. Louis crowd :) Then it is back home for the Minneapolis Office Developer Interest Group (MODIG) on the 28th! I’ll be presenting on how to build custom actions and conditions for use with SharePoint Designer! Then, with only two days left, how busy could it possibly be, right? Well... :) I’ll actually be helping to host two nights of webcasts – SIX webcasts in all for http://www.LearnSPD.com! LOTS going on for sure, but I’m loving every bit of SharePoint Designer April. By the way, in case you’re wondering... May = Silverlight Month! :) 1/8/2009Today was a pretty exciting day! I was able to get my hands on a 64-bit version of Windows 7 (Build 7000) from MSDN! First impressions? - It is a lot like Vista but at the same time everything about it feels better. I always fall back in love with my laptop when I rebuild it but this time I think it is something different – I really think I just like the Windows 7 interface more.
- The new Taskbar interface is awesome:
 I love the smaller footprint in the taskbar (feels more like an interactive quick-launch) and the ability to preview multiple windows is a great touch - The ability to rotate your desktop background seems like a silly one but it really is a cool (and LONG overdue) option:
 The only thing missing is the ability to point it to my flickr/facebook images Of course, I’m a SharePoint guy so the first thing I was curious about was can you run SharePoint on it? Thanks to the kids at Bamboo Solutions, you certainly can! Here’s a screenshot of my new setup: Now if only I could get a copy of SharePoint “14” to go with it.... 11/23/2008As I said in my previous post, I had a busy couple of weeks presenting at three different SharePoint User Groups! It was a great opportunity to see what some of the User Groups outside of Minnesota are like. My first presentation was on building Composite Applications with SharePoint Designer and the Data Form Web Part. It continues to surprise me how few people know of the power of the Data Form Web Part but that just means I have more work to do. The group in St. Louis was great and asked lots of really good questions. Before I got a chance to speak, Becky Bertram gave a great presentation on Web Content Management. Big thanks to Kurt Rolland for helping to coordinate my visit! As an added bonus, Mike Benkovich showed up as I was wrapping up my presentation and we got to talk Data Views for a while :-) The next day (after driving back from St. Louis) I co-presented with Wes at the Minnesota SharePoint User Group! We talked about Social !Networking on top of SharePoint. We also tried out an approach for recording our MNSPUG presentations (to make them available for viewing afterwards). Unfortunately, we need to play with that approach a little more but we hope to have the ability available for all of our meetings in 2009! The next week I drove over to Milwaukee for the Wisconsin SharePoint User Group. There I talked about how to use PowerShell with SharePoint. They had a smaller group (it sounds like they meet every other month and I was presenting in an "off" month) but again I got some really great questions. I also got to do my PowerShell + Wiimote demo and that was a TON of fun :) You can check out these and all of my presentations (and download resources) here. 11/7/2008Over the next two weeks I'll be presenting at THREE different SharePoint User Groups! I am super excited for the chance to see some new User Groups in action! I'm also excited that this month we'll be testing out a way to record our MNSPUG presentations to make them available for online viewing after the event! 10/24/2008Best Practice We've covered several different approaches to creating templated SharePoint Sites, now I'll bring everything together and we can walk through what I would recommend as a best practice. Goals First let's talk through my goals. You may find that our goals differ and, in that case, one of the approaches on my previous post would work fine in your scenario. - Allow Site Administrators to create a site using the out of the box site creation screens
- Support Feature Stapling for future updates
- Create no dependencies on the SharePoint Farm:
- The Site "Template" can be removed at any time without affecting previously created sites
- Minimal impact projected during future platform upgrades
Almost There At first glance we can get pretty close using the Feature Stapling approach outlined in my previous post. The biggest barrier is the creation of a new Site Definition which we have identified as an unacceptable dependency. If we want to use Feature Stapling, we need a unique Template Name to point to... If we create a unique Template Name, we have a dependency... The Keystone The piece that makes it all possible: SPWebProvisioningProvider. A Provisioning Provider can be specified in a Site Definition's webtemp*.xml file. In the configuration element, you can specify the ProvisionAssembly, ProvisionClass, and ProvisionData attributes. Hold it right there, does that mean we're creating a Site Definition? I thought they were the root of all evil? Not so fast, my friend: If you implement your own class that inherits from SPWebProvisioningProvider, you can use it to call the ApplyWebTemplate method of a Web which allows you to manually provision one of the out of the box Site Definitions! That means you get your unique Site Template Name but when the site is created it THINKS it is an out of the box Site Definition! As my buddy Tom used to say, NOW how much would you pay? :-) The Solution - Create the webtemp*.xml (using the ProvisionAssembly and ProvisionClass attributes):
- Create the Provisioning Provider (which applies the "Blank Site" Site Definition):

- Create any Feature Receivers and Feature Staplers
- Wrap everything into a SharePoint Solution and you're done!
Post-Deployment you can make updates by updating your Feature Receiver or the code in your provisioning provider. Also, if you're done making sites of that type, go ahead and uninstall your SharePoint Solution: Your sites were created using out of the box Site Definitions so there is no leftover dependency. Conclusion This series of posts covers a lot of information and skims over even more. I intend for it to be an evolving series and will be adding code samples and follow-up posts. For the latest, keep an eye on the series introduction or subscribe to this post's category.
|
|
|
|
|