Convert to .NET 4.5 Fix some issues

All projects convert to .NET 4.5
Also fix issue when server crashes on start.