Anonymous access in SharePoint 2013

Using PowerShell to modify anonymous access permissions on SharePoint On-Premises

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post is about managing Anonymous Access on a SharePoint site (SPWeb) using PowerShell commandlets. It’s often a lot more feasible and even easier than using the browser interface! In some cases, it’s borderline impossible to avoid it anyway – since accessing the GUI switch might not be possible. Description Assume you have a site collection that’s you have published to the whole world. You’ll have anonymous access enabled at both web application and site collection -levels, and configured permissions at the root web -level. Now, let’s assume you want to […]

SharePoint2013

How to properly use SPWeb.AllowUnsafeUpdates?

Reading Time: 2 minutes. This post was most recently updated on October 28th, 2018.At times you may need to allow unsafe updates for SPWeb objects to get your code to run. This, in SharePoint’s C# full-trust code, is done by setting SPWeb.AllowUnsafeUpdates to true. However, as this is an exception to security settings, you should generally avoid it. When you can’t, it’s a good practice to limit the change to as small a scope as possible. This is true even though the setting is only persisted for the duration of the request (unless the SPWeb object was gotten from SPSite.GetWeb() or SPSite.Webs[]). Enabling AllowUnsafeUpdates […]