title: Integrations tests with ASPNetCore and ServiceStack
body: <p>I have an ASP.Net Core 1.1 project that is using ServiceStack Core. I am trying to write a basic integration test that looks like so:</p>
  
  <pre><code>[TestFixture]
  public class BasicStartupTest
  {
      TestServer Server;
      HttpClient Client;
      const string BASE_URL = "http://localhost:57893";
      [OneTimeSetUp]
      public void OneTimeSetup()
      {
          Server = new TestServer(new WebHostBuilder().UseStartup&lt;Startup&gt;());
          Client = Server.CreateClient();
      }
  
      [OneTimeTearDown]
      public void OneTimeTearDown()
      {
          Server.Dispose();
      }
  
      [Test]
      public async Task ShouldHitHealthEndpointAndReturn200()
      {
          var response = await Client.GetAsync("/health");
          response.EnsureSuccessStatusCode();
      }
  }
  </code></pre>
  
  <p>Problem is, when it tried to run the GetAsync function from the Client instance, i get the following stack trace:</p>
  
  <pre><code>Result StackTrace:  at ServiceStack.Host.NetCore.NetCoreRequest.get_UserHostAddress() in C:\TeamCity\buildAgent\work\a61371dd01fad6bd\src\ServiceStack\Host\NetCore\NetCoreRequest.cs:line 215
     at ServiceStack.HttpRequestExtensions.GetAttributes(IRequest request) in C:\TeamCity\buildAgent\work\a61371dd01fad6bd\src\ServiceStack\HttpRequestExtensions.cs:line 844
     at ServiceStack.AppHostBase.ProcessRequest(HttpContext context, Func`1 next) in C:\TeamCity\buildAgent\work\a61371dd01fad6bd\src\ServiceStack\AppHostBase.NetCore.cs:line 113
     at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.&lt;Invoke&gt;d__3.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
  </code></pre>
  
  <p>It goes on, but it looks like there is an issue with some get_UserHostAddress function in ServiceStack when I try to make a call to the endpoint in my integration test. </p>
  
  <p>How do I fix this error?</p>