How to show any page in a pop-up in SharePoint

Reading Time: 6 minutes. This post was most recently updated on December 9th, 2018.This ages old trick deserves to be published – since it makes it easy to quickly show info from pretty much any another page on pretty much any classic SharePoint page (in a SharePoint-compatible pop-up). So, here goes: Using SharePoint’s JavaScript library to open an arbitrary pop-up Yes – SharePoint contains all the functionality out-of-the-box, and you almost don’t have to do anything yourself! Let’s see how this works. Okay – long story short. On all Classic SharePoint pages, you can call this function: SP.UI.ModalDialog.ShowPopupDialog(). Like it says, it quite simply just […]

SharePoint doesn't work as intended

Opening a web part page in maintenance mode

Reading Time: 3 minutes. This post was most recently updated on July 4th, 2018.Can’t access a web part page because of a broken web part? Yeah, that’s a classic issue – and it’s nicely ported into Modern world, too! In these cases, web part page maintenance mode comes in handy! There’s a query parameter available for accessing it. For whatever reasons, it’s different for Classic and Modern mode, though. Why make things easy if you can make them dificult, right? 🙂  Posts Related to “Opening a web part page in maintenance mode”:SharePoint-Teams -integration using a tabSharePoint Localization – a (somewhat) comprehensive how-to!The effect of […]

SharePoint vs. Anonymous

Troubleshooting: Anonymous access on a public SharePoint site collection failing

Reading Time: 4 minutes. This post was most recently updated on October 7th, 2018.Ah, everyone’s favorite, classic topic! Debugging SharePoint On-Premises configuration issues is the best thing since sliced bread, right? This post is about allowing/enabling Anonymous Access to a site collection – a simple configuration, that “simply works” like once every ten times you try it. Symptoms A lot of different ways to hit your head on this one. In any case, your on-premises SharePoint doesn’t allow anonymous access to a site where you are trying to allow it. Most typically, they’ll just encounter 401 error when accessing the site, or they might […]

Stock photo from pixabay.com

Using PowerShell to set ULS logging level to “extra verbose” to catch all the events in the logs

Reading Time: 3 minutes. This post was most recently updated on October 9th, 2018.This blog post describes how set the SharePoint’s ULS level to “Extra Verbose” (VerboseEx) using PowerShell. This is not possible using the browser UI, so some POSH magic is required! Luckily, it’s quite straightforward, but to avoid filling your hard drive(s) with huge log files, you should reset the level when you’re done debugging! Description of the solution By default, ULS logging is somewhat non-detailed. This means that a lot of data that could be used to debug issues is omitted. The UI cannot be used to set this level of […]

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 […]

Powershell: languagepack 0

Powershell Error: Cannot uninstall the LanguagePack 0 because it is not deployed.

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.Have you ever run into this, very non-descriptive and weird SharePoint error message “Cannot uninstall the LanguagePack 0 because it is not deployed”? You could encounter it while running some PowerShell scripts – most typically, when trying to update a wsp solution. I have, and luckily often easily solved! Symptoms Assume you’re trying to install, update or uninstall a SharePoint solution (.wsp package) using PowerShell-commands Install-SPSolution, Update-SPSolution or Uninstall-SPSolution (respectively). Operation fails with the following (or similar) error: Error: Cannot uninstall the LanguagePack 0 because it is not deployed I have actually […]

Malformed web.config causing a Parser Error

“Server Error in ‘/’ Application” or “Parser Error” – it’s actually a malformed web.config killing your ASP.NET-application or SharePoint

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post describes how to resolve a kind of cryptic and oddly misdescriptive error message about Parser Error on your ASP.NET application or (an On-Premises) SharePoint site. I ran into this after deploying wsp-packages to a SharePoint farm, but you can apparently get this on ASP.NET MVC sites, too. The error doesn’t actually tell you what’s wrong, so figuring it out took a while. Hopefully it’ll help you, though! Symptoms: Parser Error from a random-looking location Once you navigate to your web- or SharePoint site, you only get an error like this: Server […]

SharePoint project properties

Visual Studio 2010 fails to show the design view of an aspx-page

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post is about solving the issue with Visual Studio 2010 failing to show the design view of an .aspx-page. Luckily, it’s an easy and pretty classical fix. Symptoms While trying to view or edit an aspx-page in design mode in Visual Studio 2010, the window is just plain empty and there’s little you can do about it – selecting view markup or hitting F7 may not do anything and restarting the Visual Studio doesn’t help. Solution The Design view requires connection to the SharePoint site where you’ll be deploying the […]

PowerShell logo

Quickest way to download all the wsp-packages in a SharePoint farm

Reading Time: 1 minute. This post was most recently updated on October 9th, 2018.Sometimes – pretty often in the good old on-premises world, actually – you’ll need to have a copy of all the packages that are deployed to a certain farm. So – how to download all of the deployed farm solutions (essentially, cabinet files renamed to .wsp) from a farm? Luckily, it’s quite easy! Solution To download all deployed farm solutions (wsp-packages) from a SharePoint farm is pretty simple using PowerShell. No need to download individual packages through cumbersome interfaces! You don’t even have to open the Central Administration! 🙂  Posts Related […]

Too long deployment path

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Reading Time: 3 minutes. This post was most recently updated on October 9th, 2018.This post describes a few different ways of fixing the error “The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.” one can get when trying to package/publish a SharePoint solution, web site or Azure Webjob. UPDATE 11.4.2016: I actually got this nasty exception on another occasion (Azure webjob publish), so I updated the text accordingly. Symptoms Visual Studio throws the following error when packaging a SharePoint solution to a .wsp […]

IE11 compatibility view emulator

Identifying IE11 compatibility mode in SharePoint

Reading Time: 4 minutes. This post was most recently updated on October 9th, 2018.In this post, I describe how you can figure out if IE11 has jumped in the compatibility mode. This is quite important because in compatibility mode IE does its best to screw up your CSS. Compatibility view now and before Microsoft has been pretty keen on introducing new ways to handle browser compatibility and make IE behave in even stranger ways that it usually does by switching it to compatibility mode. There are a few reasons this could happen. In SharePoint’s case, perhaps the most usual one is that IE identifies the […]

Stock photo from pixabay.com

Simplest way to create a thread on SharePoint

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post describes the (probably) easiest and most straightforward way of creating a new Thread in your SharePoint (or any other .NET) server-side / desktop code. Solution: how to create a new Thread Let’s face it – one should not create new Threads lightly when developing SharePoint solutions, but sometimes it’s difficult to avoid. Or sometimes it’s just the simplest way to get around weird framework limitations. Posts Related to “Simplest way to create a thread on SharePoint”:Programmatically creating readable internal names for new SharePoint fieldsSharePoint Localization – a (somewhat) comprehensive […]

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 […]

File not found

“File not found”-error when trying to activate custom feature on SharePoint

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post is about fixing on of the most non-spesific errors you can get when activating features on SharePoint “File not found”. Problem “File not found” is one of the more annoying errors one can stumble upon when trying to activate a feature. There are quite a few reasons that can cause this error, but after the obvious ones (some files failing to be included in the package, botched wsp deployment, errorenous urls in event receiver) one thing to check might be the alternate access mappings. Posts Related to “”File not found”-error […]

SharePoint List Field Name creation dialog - the internal names for created fields are generated from the display name, and often end up being quite messy!

Programmatically creating readable internal names for new SharePoint fields

Reading Time: 4 minutes. This post was most recently updated on October 9th, 2018.This post is about a small programmatic workaround to creating new SPFields for SPLists in SharePoint with human-readable internal names. This is mainly a usability improvement for your editors (and doesn’t change your life that much), but at the very least they will probably appreciate it! In short, I’ll show you how to avoid SharePoint’s dirty encoding (like replacing a space with “_x0020_”). This appliesto when you’re using server-side code to generate fields. Problem: non-readable internal names for SharePoint list fields When you create a new field in SharePoint, SharePoint accepts […]

SharePoint Authentication prompt

SharePoint Windows Authentication fails on other addresses than localhost

Reading Time: 2 minutes. This post was most recently updated on October 9th, 2018.This post describes how to fix Windows Authentication on a SharePoint server failing on other addresses than localhost. Symptoms You get the standard Windows/Basic Authentication prompt when accessing your SharePoint site, but the site won’t accept your credentials when your accessing the site using an address like http://website. However, using address like http://localhost works fine (but of course may cause other problems). You also get event log entries like this (most likely in System -category): The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name […]