Changing Site Settings through code in SharePoint 2010

It’s been quite a while since I had the time to post. A customer dropped me this question today and I thought it’d be interesting to share. He wanted to change the “Allow rules to specify another site as a target location”-setting (seen below) through code and needed to know if this could be done….

1

PowerShell - Editing permissions on a file or folder

I got the following question from a reader the other day: I’ve been trying to figure out how to change permissions on a folder in PowerShell. I’ve looked at the Get-Acl and Set-Acl, but I can only use them to copy the settings from a pre-existing object. How do I manually configure permissions? This is…

21

PowerShell - Automatically organizing your mp3-collection

Is your mp3-collection perfectly sorted? I know mine wasn’t. I thought I’d address that while creating a pretty good demo-script to show some basic filtering, script structures, etc. Since I also wanted the script to extract the metadata from every file in my collection I had to use the Shell.Application Com-object as well. All in…

6

Implicit casting in DataRepeater not working in certain scenarios after SP1

Problem Using the following VB-syntax in a DataRepeater will no longer work after applying .NET Framework 2.0 Service Pack 1 in a medium-trust environment. <asp:Repeater ID=”Repeater1″ runat=”server”>        <ItemTemplate>               <%#Container.DataItem(“data”)%><br />        </ItemTemplate></asp:Repeater>   Resolution Use Eval-method, as recommended in all Microsoft documentation. Using explicit casting would work as well, but you’d have to re-write every page…

2

My language of choice can't decode an URIEncoded string

Problem: Some time ago I was asked to help in decoding an URI Encoded string from VB6. URL Decoding is simple enough, but when you’re working with Greek, Hebrew, etc. that just isn’t enough. Resolution: A quick search revealed a truckload of samples on how to do URL Decoding, but URI Decoding is a bit…

0

Stress-O-Matic

A very simple stress-test The other day I was asked by a customer if I a small application that could be used to stress a web application. I didn’t feel like responding “Sure I do! Visual Studio 2005 Team Edition For Software Testers” and I also didn’t feel like saying “Why don’t you make one…

2