title: System.Data.SqlClient.SqlException: Login failed for user ''
body: <p>I am trying to run my entity framework model on the web.</p>
  
  <p>Here is my connection string:</p>
  
  <pre><code>connectionString="metadata=res://*/EmployeeModel.csdl|res://*/EmployeeModel.ssdl|res://*/EmployeeModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=BTC-L8LBXTY1-2\MSSQLSRVER2014;initial catalog=Test;integrated security=False;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient"
  </code></pre>
  
  <p>I don't have a username or password to go with my connection string, but some other posts have said it could be one of those?</p>
  
  <p>Here is the stack trace of errors that I receive:</p>
  
  <pre><code>[SqlException (0x80131904): Login failed for user ''.]
     System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) +821
     System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +332
     System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
     System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +699
     System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +89
     System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection) +426
     System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection) +78
     System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection) +191
     System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +154
     System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +21
     System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +90
     System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +209
     System.Data.SqlClient.SqlConnection.Open() +96
     System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean&amp; closeStoreConnectionOnFailure) +41
  
  [EntityException: The underlying provider failed on Open.]
     System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +967
     System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +22
     System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
     System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
     System.Web.UI.WebControls.GridView.DataBind() +9
     System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
     System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
     System.Web.UI.Control.EnsureChildControls() +92
     System.Web.UI.Control.PreRenderRecursiveInternal() +42
     System.Web.UI.Control.PreRenderRecursiveInternal() +160
     System.Web.UI.Control.PreRenderRecursiveInternal() +160
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zuyDG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zuyDG.png" alt="This is my database connection."></a></p>
  
  <p>I added the parameters to my connection string for the username matching this one, and an empty password.</p>