title: Login failed for user 'DESKTOP-SBFCRKL\Shaharyar Parekh'
body: <p>I want to connect my asp.net web page to SQL Server 2014. My connection string is:</p>
  
  <pre><code>connectionString="Data Source=DESKTOP-SBFCRKL\SQLEXPRESS; 
      Initial Catalog=OnlineShop; 
      Integrated Security=True;"
  </code></pre>
  
  <p>When I run the project I get:</p>
  
  <p>**> Server Error in '/onlineshoes' Application.</p>
  
  <blockquote>
    <p>Cannot open database "OnlineShop" requested by the login. The login
    failed. Login failed for user 'DESKTOP-SBFCRKL\Shaharyar Parekh'.</p>
    
    <p>Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.Data.SqlClient.SqlException: Cannot open
    database "OnlineShop" requested by the login. The login failed. Login
    failed for user 'DESKTOP-SBFCRKL\Shaharyar Parekh'.</p>
    
    <p>Source Error: </p>
    
    <p>Line 781:            this.Adapter.SelectCommand =
    this.CommandCollection[0]; Line 782:<br>
    DS_CAT.CATEMST_SELECTDataTable dataTable = new
    DS_CAT.CATEMST_SELECTDataTable(); Line 783:<br>
    this.Adapter.Fill(dataTable); Line 784:            return dataTable;
    Line 785:        }</p>
    
    <p>Source File: c:\Users\Shaharyar Parekh\AppData\Local\Temp\Temporary
    ASP.NET Files\onlineshoes\11df693e\771d1f70\App_Code.rcz9orfq.2.cs<br>
    Line: 783 </p>
    
    <p>Stack Trace: </p>
    
    <p>[SqlException (0x80131904): Cannot open database "OnlineShop"
    requested by the login. The login failed. Login failed for user
    'DESKTOP-SBFCRKL\Shaharyar Parekh'.]<br>
    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<br>
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
    options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo,
    DbConnectionPool pool, DbConnection owningConnection,
    DbConnectionOptions userOptions) +332<br>
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool
    pool, DbConnection owningObject, DbConnectionOptions options,
    DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38<br>
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
    owningObject, DbConnectionOptions userOptions, DbConnectionInternal
    oldConnection) +699<br>
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject, DbConnectionOptions userOptions, DbConnectionInternal
    oldConnection) +89<br>
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
    owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean
    allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions
    userOptions, DbConnectionInternal&amp; connection) +426<br>
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
    owningObject, TaskCompletionSource<code>1 retry, DbConnectionOptions
    userOptions, DbConnectionInternal&amp; connection) +78<br>
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
    owningConnection, TaskCompletionSource</code>1 retry, DbConnectionOptions
    userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp;
    connection) +191<br>
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection
    outerConnection, DbConnectionFactory connectionFactory,
    TaskCompletionSource<code>1 retry, DbConnectionOptions userOptions) +154<br>
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory,
    TaskCompletionSource</code>1 retry, DbConnectionOptions userOptions) +21<br>
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource<code>1
    retry) +90<br>
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource</code>1
    retry) +209    System.Data.SqlClient.SqlConnection.Open() +96<br>
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
    srcTable, IDbCommand command, CommandBehavior behavior) +120<br>
    System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32
    startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
    behavior) +160    System.Data.Common.DbDataAdapter.Fill(DataTable
    dataTable) +108<br>
    DS_CATTableAdapters.CATEMST_SELECTTableAdapter.select() in
    c:\Users\Shaharyar Parekh\AppData\Local\Temp\Temporary ASP.NET
    Files\onlineshoes\11df693e\771d1f70\App_Code.rcz9orfq.2.cs:783<br>
    KPATEL_Home.Page_Load(Object sender, EventArgs e) in
    f:\Downloads\Compressed\onlineshoes\Home.aspx.cs:26<br>
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
    EventArgs e) +51    System.Web.UI.Control.OnLoad(EventArgs e) +95<br>
    System.Web.UI.Control.LoadRecursive() +59<br>
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +678**</p>
  </blockquote>
  
  <p>Does anybody know how to solve this issue?</p>