Login Failed for user... connection string exactly the same

Discussion in 'General troubleshooting' started by indigomike7, Mar 11, 2013.

  1. my site : nicelookingcars.com is error when I login it displays error:

    Server Error in '/' Application.
    Login failed for user 'DB_56001_nicelook_user'.
    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.

    Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'DB_56001_nicelook_user'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SqlException (0x80131904): Login failed for user 'DB_56001_nicelook_user'.]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5296071
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +558
    System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1682
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +69
    System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +30
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +317
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +889
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +307
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions) +434
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +225
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +37
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions) +558
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions) +67
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1052
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +167
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +143
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +83
    System.Data.SqlClient.SqlConnection.Open() +96
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +233
    WebSite.admin.Login.AdminUserLogin(String username, String password) in Login.aspx.cs:113
    WebSite.admin.Login.lnkbtnLogin_Click(Object sender, EventArgs e) in Login.aspx.cs:44
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +116
    System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +101
    System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9642898
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

    can someone help me with this? I have my connection string is good and exactly the same (copy paste) from connection string in controlpanel database manage and type the password not star. Urgently please..

    For contact support login in Winhost.com it shows error too just like i have, i wonder if the technician see this in his own business page :(
     
    Last edited by a moderator: Oct 14, 2015
  2. Elshadriel

    Elshadriel Winhost Staff

    I took a quick look at your database connection string. It is incorrect. The database server you need to connect to is s08.Winhost.com, not s07.Winhost.com.
     
    Last edited by a moderator: Oct 14, 2015
  3. thank you.. it's working now..
     
  4. ComputerMan

    ComputerMan Winhost Staff

    Glad you worked out your problem! :)
     
  5. In Sql Server, user accounts and credentials are set at the server level, not at the database level. When you deploy an SQL database, only the database info moves over. You need to connect to the Database Server in your deployed environment , set up the username and password you want to use, and give the account appropriate permissions into the database. Login failed for User is a general sql error message and may have several causes. So, first you have to make sure that the user exist on SQL Server , that the user is enabled, and has access (mapped) to the correct database.
    • In most cases, just set "Integrated Security=False" and it will work.
    • Make sure that you have the Mixed-Mode authentication enabled and here is how to enable it.
    Also, either one of three things you will need to do to correct this issue:
    • Add the user used by the worker process to the SQL database and assign the appropriate permissions.
    • Change the Connection String to use a predefined user name and password.
    • Change the Anonymous authentication credentials or the credentials used by the worker process.
     

Share This Page