Scott Helme has posted a number of interesting blog posts recently:
I mean, he’s a bit of a LetsEncrypt fan, but equally, their certificates are as good as others, and EV Certs and SSL Warranties do seem to be sources of revenue generation, rather than offering something useful.
What I’d really like is an easy way to use LetsEncrypt with IIS; for a long time it has seemed like a second-class citizen. Or maybe scripting is just more awkward in Windows. Either way, it’d be great to have simple tooling to support automatically renewing IIS site certs.
Then we could reduced certificate lifetimes and overcome the problems of the broken revocation process in certificates.
I had a gnarly support call today. One of our customers was using Announcement lists to display news on the homepage of their intranet, and they’ve a thumbnail image they’d set for each item. Then, on the home page, they’ve got a Content Query Web Part using some custom XSL to render those announcements.
However, the Content Query Web Part would only show some of the thumbnail images.
TL;DR – Saving an image field on a ‘New’ form without a descripion saves a different format to after an ‘Edit’, which sets a default even if you don’t change the image field value.
Continue reading “Awkward SharePoint Link field text”
I was trying to get the managers of a SharePoint user, and I kept getting the error:
An error was encountered while retrieving the user profile
This was from a custom workflow step in an automatically started workflow. If I ran the workflow manually, it worked – but auto-started workflows failed. Continue reading “UserProfile.GetManagers : “An error was encountered while retrieving the user profile””
SharePoint has this funny mechanism ‘Alternate Access Maps’. Essentially, this means that the same content can be available via different web applications, which have different URLs.
But what do you do if you’ve an absolute URL to something in SharePoint, and you need it to be correct for the users’s current alternate access map zone?
Well, there is a function SPUtility.AlternateServerUrlFromHttpRequestUrl() – but I couldn’t see how to use it. Internally, it uses RebaseUriWithAlternateUri() – looks promising. And it works.
string url - "Absolute URL in the wrong zone";
SPUrlZone zone = SPContext.Current.Site.Zone;
Uri currentZoneUrl = SPFarm.Local.AlternateUrlCollections.RebaseUriWithAlternateUri(new Uri(url), zone);
I’m a bit suspicious of using the local SPFarm object, but that seems to work correctly. Others do seem to have done this:
I always find myself having to look this stuff up, and it’s nearly always for the same format of redirect, so here’s a reminder for myself. In SharePoint, you can redirect to a page in Layouts (in this case, the site settings page) with:
SPUtility.Redirect("settings.aspx", SPRedirectFlags.Static | SPRedirectFlags.RelativeToLayoutsPage|SPRedirectFlags.UseSource, HttpContext.Current);
This also will redirect to a
&source= get parameter if available. It also deals with the HIVE number (
/15/) in the URL automatically.
Nearly all SharePoint farms I look at show the error:
Drives used for SQL databases are running out of free space
However, this seems to happen even on SharePoint farms where there is tonnes of space. It’s always puzzled me, and it results in many customers simply ignoring the warning, ‘cos they can’t figure out why they’re getting it, and having checked the drives they think they’re fine (and they probably are).
Well Zoltan Kovacs has a very good analysis. It’s well worth a read. Continue reading “Drives used for SQL databases are running out of free space”
I’ve been writing a client side object model script to set up some sites, including setting some the navigation settings on the site. Sadly, Microsoft have written SharePoint to involve at least 3 objects in the navigation settings for a site (PublishingWeb, WebNavigationSettings, and SPNavigation. At least. It’s totally effing bonkers.), and those objects don’t work in quite the same way for CSOM. For example, it’s not clear how to set a site to ‘show subsites’ in the global navigation. Continue reading “Set Global Nav in CSOM”