Ignoring SSL Certificate Errors On .NET Core On HttpClient

Written by William Roush on December 20, 2016 at 8:28 pm

Had a certificate expire at 8PM EST tonight on a critical project I was supposed to demo, wasn’t going to stop me… lots of articles don’t really go over how to do this now on .NET Core 1.0, so lets cover the code to do so:

using (var httpClientHandler = new HttpClientHandler())
   httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; };
   using (var client = new HttpClient(httpClientHandler))
       // Make request here.

Pretty simple, really.

Setting Up TeamSpeak 3

Written by William Roush on October 11, 2016 at 6:28 pm

Remote Office Workers And Easy Communication

Under some circumstances workers that work from home or in different offices may want to stay continuously connected, with the same ease of access as you would have if you were working in a group around a table. Most VOIP systems used for telephony services can work, but setting up conferences can be annoying, and the always-on behavior and difficultly to “break out” from a group chat to chat privately can be annoying.

What Is TeamSpeak?

Why TeamSpeak and not Ventrilo/Skype/Mumble?


Ventrilo is a VoIP solution commonly used for video games. The business model for ventrilo revolves around licensing for resellers, with only the 8 seat server being available for download. Additionally it’s old and doesn’t have the nicer security features of Mumble and TeamSpeak 3.


Skype It doesn’t provide the instant access and ability to “jump in” to rooms at any times, also the total control of the environment helps improve security.


Mumble is an open source VoIP solution that has picked up a lot in the gaming community. Unlike Ventrilo it isn’t limited to the 8 seats or TeamSpeak which is limited to 512 for free servers. Mumble would be my second choice, however last time I used Mumble it wasn’t quite as polished in terms of ease to use and set up, otherwise it would be my first.

Additional Security Settings You’ll Enjoy

Security Tokens Vs. Passwords

Everyone’s identity has a private key that they use to identify themselves with. This private key removes the need for user account management with passwords on every server they connect to. This also allows the user to export their private key to their other devices and have their identities follow them around regardless of the device.

Setting Up Virtual Servers

Virtual servers allow you to have multiple TeamSpeak instances on a single TeamSpeak install. You’re still limited by your total license count (so if you have a 512 connection license, you can have 2×256 connection virtual servers, or however you want to divvy that up).

Setup and Install

We’re going to download TeamSpeak 3 and install it into /opt/teamspeak, get the latest download from the TeamSpeak 3 site.

root@teamspeak:/# cd /opt
root@teamspeak:/opt# wget http://dl.4players.de/ts/releases/
root@teamspeak:/opt# tar xvf Teteamspeak3-server_linux-amd64-
root@teamspeak:/opt# mv teamspeak3-server_linux-amd64 teamspeak

Now we’ll fire up TeamSpeak.

root@teamspeak:/opt/teamspeak# ./ts3server_startscript.sh start
Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file
                      I M P O R T A N T
               Server Query Admin Account created
         loginname= "serveradmin", password= "G1Cucbel"

                      I M P O R T A N T
      ServerAdmin privilege key created, please use it to gain
      serveradmin rights for your virtualserver. please
      also check the doc/privilegekey_guide.txt for details.


The serveradmin username/password and token you’re given are very important, save them, we’ll be using them later.

Logging Into TeamSpeak

Fire up your TeamSpeak client, click “Connections” and select “Connect”, you’ll be presented with the connection window.

TeamSpeak - Connect

You’l want to take that token you had in the installation step and put it into the privilege window that pops up. If it doesn’t pop up select “Permissions” and “Use Privilege Key”. Entering this key will make you a server administrator for this virtual server instance.

TeamSpeak - Use Key

Virtual Server Configuration

Next we’ll dive into the configuration of the virtual server, right click on the name of the server and select “Edit Virtual Server”.

TeamSpeak - Edit Server

TeamSpeak - Server Config

Here you’re given options to change the server name, put limits, passwords, change security settings, and configure various messages the user will get upon logging on to your server.

Configuring Chat Rooms

Right click on the server again and select “Create Channel”

TeamSpeak - Create Channel

Here we can give a channel a name, topic, description and set it’s type (usually you’ll be setting this to “permanent”). The audio tab allows you to edit audio codec settings, you can configure the trade-off between sound quality and bandwidth requirements here. Changing codec settings can be useful for making a channel for which people on flaky cell phone connections can join in.

TeamSpeak - Create Channel - Permissions

TeamSpeak - Create Channel - Advanced

RhodeCode Session Storage Growing Out Of Control

Written by William Roush on October 11, 2016 at 6:13 pm

Had a fun run in with RhodeCode recently, it’s session storage located at /home/rhodecode/.rccontrol/community-1/data/sessions was eating up 401981 inodes! Eek!

This is caused by the built-in default session manager lib not cleaning up old files, I had stumbled across this blog detailing how to “fix” it: http://it-spir.it/blog/2012-03-31-rhodecode-remove-outdated-session-data.html¬†and I ended up with this in my crontab:

0 1 * * * find /home/rhodecode/.rccontrol/community-1/data/sessions -type f -mtime +3 -exec rm {} \;

Alas this wasn’t really what I wanted, so I asked on the RhodeCode-Community Slack channel fix is to use something like the database for session storage as seen here: https://docs.rhodecode.com/RhodeCode-Enterprise/admin/tuning-increase-db-performance.html


A quick enabling of beaker’s database session storage and I was all better!


server.urls Paramter Not Working On Kestrel Server for dotnet Command on ASP.NET Core RC2

Written by William Roush on May 21, 2016 at 3:53 am

Was struggling really hard with getting this command to work:

dotnet run -- --server.urls http://*:5000

Simple command, but it isn’t taking! Well I missed one major thing when upgrading from RC1 to RC2, I need to now pass configuration down to the Kestrel stack, to do that is pretty easy:

        public static void Main(string[] args)
            var config = new ConfigurationBuilder()
                .AddEnvironmentVariables(prefix: "ASPNETCORE_")

            var host = new WebHostBuilder()


Needed to define the “config” variable and pass it to WebHostBuilder using UseConfiguration(). All fixed!