title: System.Net.Sockets.SocketException: Could not resolve host - Self-hosted Nancy app on Mono
body: <p>I have the following code in my Program.cs to start a self-hosted nancy app on Mono 4.2.2.</p>
  
  <pre><code>    public static void Main (string[] args)
      {           
          var uri = "";
  
          if(ReflectConfiguration.CurrentEnviroment == ReflectConfiguration.Environments.Production || ReflectConfiguration.CurrentEnviroment == ReflectConfiguration.Environments.Staging)
          {
              uri = string.Format("http://localhost:{0}", Environment.GetEnvironmentVariable("PORT").ToString());
          }
          else if(ReflectConfiguration.CurrentEnviroment == ReflectConfiguration.Environments.Development)
          {
              uri = string.Format("http://localhost:8888");
          }
  
          Console.WriteLine("Starting Reflect.Web application on " + uri);
  
          // initialize an instance of NancyHost
          var host = new NancyHost(new Uri(uri));
          host.Start();  // start hosting
  
          // check if we're running on mono
          if (Type.GetType("Mono.Runtime") != null)
          {
              // on mono, processes will usually run as daemons - this allows you to listen
              // for termination signals (ctrl+c, shutdown, etc) and finalize correctly
              UnixSignal.WaitAny(new[] {
                  new UnixSignal(Signum.SIGINT),
                  new UnixSignal(Signum.SIGTERM),
                  new UnixSignal(Signum.SIGQUIT),
                  new UnixSignal(Signum.SIGHUP)
              });
          }
          else
          {
              Console.ReadLine();
          }
  
          host.Stop();  // stop hosting
      }
  </code></pre>
  
  <p>This code ran fine for months. Just now this error started showing up:</p>
  
  <pre><code>System.Net.Sockets.SocketException: Could not resolve host '+'
  </code></pre>
  
  <p>on this line:</p>
  
  <pre><code>host.Start();  // start hosting
  </code></pre>
  
  <p>I am not aware of any updates I have made recently to any dependency.</p>
  
  <p>Has anyone ever come across this before? And why the '+' sign?</p>