Setting up anonymous access on a SharePoint site can be more complex then simply turning it on at the web application and site collection levels, especially when custom code is involved. In particular, CSOM code will generally not work out-of-the-box for anonymous users. This is by-design; the default permissions mask for the Anonymous user prevents