SharePoint vs. Anonymous

Troubleshooting: Anonymous access on a public SharePoint site collection failing

Reading Time: 4 minutes. 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 be missing some of the content or styles, resulting […]

SharePoint is not broken - it just does't work

How to fix “- – the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized'” error

Reading Time: 5 minutes. While running some SharePoint Online -PowerShell commandlets, or connecting to a SharePoint Online site from your app, you get a following (or similar) error about your SharePoint Online credentials being unauthorized for something you should definitely be authorized to do: Cannot contact web site ‘https://<tenant>-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized’. And that’s not all – by digging into the full error message, you find the underlying internal error: MSDAVEXT_Error=917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically. What awakens my curiosity, is this line: Access denied. Before opening files in this location, you must first browse […]

Call to sites Graph API requires “owner” permissions for site collection regardless of app permissions

Reading Time: 4 minutes. Okay – yet another weird issue, and a hacky workaround. I was developing an app that was calling a SharePoint site through Graph API, using jQuery $.ajax call (developed in TypeScript), and ran into surprising 401 errors. I did find a workaround, but am also working on an actual fix. Description To get SharePoint site ID, which is needed when accessing SharePoint lists, the calls seemed to fail for my test accounts. Everything was working fine for my developer account, which was a global admin, so the first thing I was suspecting was of course permissions… The first offending test […]

Azure AD Login error

4 ways to fix error AADSTS65001 (The user or administrator has not consented to use the application)

Reading Time: 6 minutes. Fixing issues with Azure AD authentication for Enterprise applications can be tricky. This article contains multiple different fixes to an issue, where granting admin consent has somehow failed. Not all of the different solutions will work for all situations, though! That’s why I included a couple of different options to try. Changes are, one of them works for you! 🙂 Reason for issues with Admin Consent (like AADSTS65001)? Imagine this: You’re trying to add or use an app, but the requires such permissions from your tenant, that only an administrator can grant. Typically to add this kind of an app, you’ll […]

"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."

Fixing the “For security reasons DTD is prohibited in this XML document.” issue

Reading Time: 3 minutes. This post describes a couple of ways to fix the issue “For security reasons DTD is prohibited in this XML document”. At least for me, it appeared when trying to access SharePoint Online using Powershell or a console program using OfficeDev.PnP (which in turn uses CSOM). Error When running any piece of code, whether in PowerShell, .exe console or anything else than in the code behind relies on .NET Framework, you get an error like this: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the […]

Fixing Lenovo T460S Wifi connectivity issues (removing the evil versions of Intel Dual Bank Wireless-AC 8260 driver)

Reading Time: 4 minutes. I recently received a new work laptop – Lenovo T460S. A cute little thing with impressive performance and reasonably good battery life. However, what people frequently complaing about online in regards of this laptop, is its absolutely, horribly awful wifi. This, in turn, is probably caused by it’s bad wifi chip, Intel Dual Bank Wireless-AC 8260. And they’re right – it’s a load of crap. Posts Related to “Fixing Lenovo T460S Wifi connectivity issues (removing the evil versions of Intel Dual Bank Wireless-AC 8260 driver)”:Getting Connect-MsolService (and other Azure Active Directory PowerShell cmdlets) to workA cautionary tale of relying on […]

Typescript & React.JS

Fixed: Cannot use JSX unless the ‘–jsx’ flag is provided

Reading Time: 2 minutes. This blog post is about fixing issues related to building a project with TypeScript files. Basically, if your jsx or tsx -files are not getting built to js-files (which is what the browser understands) in Visual Studio’s build, this post might solve the issue for you. Description While converting a project using React.js to TypeScript (and, hence, to use .ts and .tsx files instead of .js and .jsx) I stumbled upon this error: Cannot use JSX unless the ‘–jsx’ flag is provided The project would not build a .tsx-file with ReactDOM.render(…) in it. This is a huge issue, of course, […]

Duplicate String values

Duplicate object values in ASP.NET MVC Display Templates? Easy fix!

Reading Time: 2 minutes. Are you getting duplicate object values (or whatever those Objects output in .ToString())? Eh, so was I, after I edited the display template for String. Found a fix, though. Description Okay – I just ran into one of my more stupid mistakes since.. Well, since forever. I had made some quick and simple edits in String.cshtml display template (among quite a few other edits before building again and seeing what happened), as I added support for Enum values there. After that I started getting duplicate values for String-typed properties.  Apparently, mistakes were made. Solution Luckily, this was easy to fix […]

Powershell: languagepack 0

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

Reading Time: 2 minutes. 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 seen this also in the form of “Cannot uninstall […]

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 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 Error in ‘/’ Application. Parser Error Description: An error […]

IE11 compatibility view emulator

Identifying IE11 compatibility mode in SharePoint

Reading Time: 4 minutes. 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 SharePoint site to be located in intranet zone… Or […]

File not found

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

Reading Time: 2 minutes. 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 when trying to activate custom feature on SharePoint”:Getting Connect-MsolService […]

Troubleshooting guide for Windows hosts -file

Reading Time: 4 minutes. This post describes how to fix possible issues with 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, hosts 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 elevated privileges for the text editor process, so you’ll need to run it as an administrator. Posts Related […]