The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener

Recently, I was cleaning up an existing Selfhost Owin Asp.NET Web Api project. After removing some seemingly unused references the project crashed when starting the api.

Exception was this:

The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener

The solution was quite simple: I removed the NuGet package that contains the HttpListener because there is no direct reference to it but Owin still needs the package to start. So just add the NuGet package: Microsoft.Owin.Host.HttpListener again and everything works as before. 

EB Command Line Interface: Error: Command returned non-zero status: status=256

When installing the EB Command Line Interface on a Mac I came across this error several times:
Running cmd: ln -s ~/.ebvenv/bin/eb /usr/local/bin/eb
ln: /usr/local/bin/eb: Permission denied
Error setting up link to /usr/local/bin. Add "alias eb=~/.ebvenv/bin/eb" to your profile.
Error: Command returned non-zero status: status=256

I am not sure what causes the error because all I did was executing:

curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python

The error also states the solution: Simply open ~/.bash_profile and add the following line:

alias eb=~/.ebvenv/bin/eb

Change language of existing SharePoint site collection

From time to time it happens that the wrong language is selected when creating a SharePoint site collection. According to Microsoft there is no supported way to change the language of an existing site collection. This is the case because the provisioning language impacts the names of the pre-created items such as document libraries. From a user perspective to most annoying problem is the wrong language of mail notifications.

If you only need to ensure the correct mail language there is an easy workaround. Open SQL Management Studio and execute this query on the respective content database.


Update [dbo].[AllWebs] set Language = [LCID]

This will change the language on all site collections but you can add where-statements to update only the necessary entries. The LCID is the language code used by Microsoft (and SharePoint).

Bower install / NPM install behind a proxy

Often when you work in a company network your are using a proxy to connect to the internet and it is not uncommon that you receive the following error when trying to execute bower install or npm install

ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/jquery/jquery.git", exit code of #128

The proxy is blocking the connection to Github because most proxy do not allow git://-urls. The solution for this is very simple. Just change the git urls to https and everything will work. This command changes all github urls to https:

git config --global url.https://github.com/.insteadOf git://github.com/

Not enough physical memory is available to power on this virtual machine with its configured settings.

Virtual Machines are more or less commodity for modern development environments. I have been very happy with VMWare Workstation for a long time. I have several SharePoint (and other) setups running and never had a problem.

Recently, I got the message

Not enough physical memory is available to power on this virtual machine with its configured settings.

whenever I tried to start a virtual machine. But my workstation had more than enough free memory available. Even restarting did not solve the problem. Google told me that a windows update could be the problem but I found only very old KB’s as potential causes.

By accident I stumbled upon a post that pointed to VMWare config.ini. Just add this line:

vmmon.disableHostParameters = "TRUE"

to the end of the file and VMWare starts working again. I am not exactly sure what the cause of the problem was, but at least I know how a workaround.

gulp-nodemon: Object # has no method ‘spawnSync’

gulp-nodemon is a nice tool if you want to restart your node process when your source code changes. It is very easy to use. Just take this snippet from their sample code and modify the script to your needs.

gulp.task('develop', function () {
  nodemon({ script: 'server.js'
          , ext: 'html js'
          , ignore: ['ignored.js']
          , tasks: ['lint'] })
    .on('restart', function () {
      console.log('restarted!')
    })
})

Just fire up “gulp develop” and the server will start.

You might receive the following error: Object #<Object> has no method ‘spawnSync’

In this case check your node version (e.g. mine was 0.10.26). As stated in the release notes (here) you need to use Node.js version 0.12 in order to use it. You either use an older version of gulp-nodemon or upgrade your Node.js installation to the correct version.