title: How to connect ASP.Net Core to a SQL Server Docker container on Mac
body: <p>I am developing an ASP.Net core MVC application using Visual Studio 2017 on Mac. However, I am facing some problems to connect to an instance of SQL Server that is running on a Docker container. </p>
  
  <p>This is the connection string I'm using:</p>
  
  <pre><code>"ConnectionStrings": {
      "myCustomConnString": "Server=localhost;Database=myDataBase;User Id=sa;Password=myPassw0rd;Trusted_Connection=True;MultipleActiveResultSets=true"
    }
  </code></pre>
  
  <p>And this is the error I am getting:</p>
  
  <blockquote>
    <p>Cannot authenticate using Kerberos. Ensure Kerberos has been
    initialized on the client with 'kinit' and a Service Principal Name
    has been registered for the SQL Server to allow Kerberos
    authentication. ErrorCode=InternalError,
    Exception=Interop+NetSecurityNative+GssApiException: GSSAPI operation
    failed with error -  An unsupported mechanism was requested (unknown
    mech-code 0 for mech unknown).</p>
  </blockquote>
  
  <p>Using SQL Operation Studio, Azure Data Studio and/ or Visual Studio Code and passing the same parameters I can connect to the docker instance of SQL Server. But not when running the ASP.Net core app. So, I'm not sure if I am missing any additional parameter for the connection string.</p>
  
  <p>Does anyone have try this before? </p>
  
  <p>Regards!</p>