PowerShell header

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

This blog post describes how to set 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…Continue reading Using PowerShell to set ULS logging level to “extra verbose” to catch all the events in the logs

Anonymous access in SharePoint 2013

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

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 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,…Continue reading Using PowerShell to modify anonymous access permissions on SharePoint On-Premises

Powershell: languagepack 0

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

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). The operation fails with the following (or similar) error: Error: Cannot uninstall the LanguagePack 0 because…Continue reading Powershell Error: Cannot uninstall the LanguagePack 0 because it is not deployed.

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

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. Though hopefully, it helps you! Symptoms: Parser Error from a random-looking location Once you navigate to your web- or SharePoint site, you only…Continue reading “Server Error in ‘/’ Application” or “Parser Error” – it’s actually a malformed web.config killing your ASP.NET-application or SharePoint

SharePoint project properties

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

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 Whilst trying to view or edit an aspx-page in design mode within 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 a connection to the…Continue reading Visual Studio 2010 fails to show the design view of an aspx-page

Too long deployment path

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.”

This post describes a few different ways of fixing the “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.” error. One can encounter this issue when trying to package/publish a SharePoint solution, web site, or an Azure Webjob. Symptoms Visual Studio throws the following error when packaging a SharePoint solution to a .wsp file when deploying or publishing your web project (for example…Continue reading 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.”

IE11 compatibility view emulator

Identifying IE11 compatibility mode in SharePoint

In this post, I describe how you can figure out if IE11 (Internet Explorer 11) has jumped into compatibility mode. You will run into this requirement every now and then when trying to figure out some SharePoint browser compatibility mess-up. This is quite frequent 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 making IE behave in even stranger ways than it…Continue reading Identifying IE11 compatibility mode in SharePoint

File not found

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

This post is about fixing one of the most annoyingly unspecific errors that you can get when activating (Feature Framework) features on SharePoint – “File not found”. Whatever that might mean, right? Problem Ugh. A plain and simple “File not found” is one of the more annoying errors one can stumble upon when trying to activate a feature. It usually gets thrown at you quite quickly after hitting the activation button on your feature management page – and it’ll look somewhat like the below: There…Continue reading “File not found”error when trying to activate a custom feature on SharePoint

Visual Studio's Attach to Process -dialog

Attaching the Visual Studio debugger to the right IIS worker process

Every now and then comes the time when you’d actually need to debug something, and then you’ll likely be using your Visual Studio to attach the debugger to one or more processes. Using CKSDev to attach to all IIS worker processes (w3wp.exe), or if you don’t use CKSDev, just pressing ctrl+p and selecting the processes from the list, is often a good enough solution. However, sometimes that makes your dev box sluggish, or maybe catches exceptions from code you’re not wishing to debug at the…Continue reading Attaching the Visual Studio debugger to the right IIS worker process

Troubleshooting guide for Windows hosts file

This post describes how to fix possible issues with the Windows hosts file. I’ll first document how to find the damn file, and then go through a bunch of options on what to check and how to fix different possible issues. Opening the hosts -file First of all, the host’s file location is usually: C:\Windows\System32\drivers\etc\hosts (link may or may not work depending on your security settings and browser version, but you can always copy-paste it to your text editor’s “Open”-dialog… :) Editing the file requires…Continue reading Troubleshooting guide for Windows hosts file

SharePoint Authentication prompt

Windows Authentication fails on SharePoint for all hostnames (other than localhost)

This post describes how to fix Windows Authentication on a SharePoint server that is failing on other local addresses other 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 you are accessing the site using an address like http://website. However, using an 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…Continue reading Windows Authentication fails on SharePoint for all hostnames (other than localhost)