Posts

Showing posts from 2017

Getting Authentication Prompt When Accessing SharePoint Web Services

You have a SharePoint site that is configured to be accessible by anonymous users, and the site's permissions are also configured to allow anonymous users.  You create a JavaScript based web part to access SharePoint's web services, pull list items, and display them using the GetListItems SOAP 1.2 call.  For some reason, users are prompted to authenticate when accessing your site.  I discovered that the fix for this is in the web request content type. If you set the content type to "text/xml; charset=utf-8" as in the SOAP 1.1 envelope sample, SharePoint won't prompt you to authenticate. Here's the /_vti_bin/lists.asmx?op=GetListItems output for reference: SOAP 1.1 The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values. POST /_vti_bin/lists.asmx HTTP/1.1 Host: moss2007hv.kor.cmil.mil Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://schemas.mi

SP2013 and PlanetWilson.SharePoint.ColourCalendarV2.4

So, we finally upgraded to SharePoint 2013. PlanetWilson.SharePoint.ColourCalendarV2.4 was being used on our old SP2007 farm.  I delayed writing this script until my company was off of SP2007, thinking someone else would write it by the time we migrated. However, I noticed no one easily Googleable has done it. So after a few hours of coding, here is the script that you can add to your calendars that are using Planet Wilson color coding to get it working again, as originally designed (pulling colors from the Colour Calendar Mapping list). I wrote it using SharePoint 2013 JavaScript Client API.  I didn't use JQuery to reduce the number of library dependencies it had.  Just plain old JavaScript.  It uses document.getElementsByClassName, though, which only started getting support from IE  after IE11.  If you are on SP2013, you are more than likely using a fairly recent browser, anyways. 1) Throw the below code into a file called PlanetWilsonSP2013.js. 2)  Upload it to a