Login failed for 'user\Guest'. in web application

Discussion in 'Site Programming, Development and Design' started by shankbond, Sep 14, 2009.

  1. Hi, I am a registered member of Winhost ,I have developed a web application in asp.net 3.0/VS 2008, Iam also using SQl server 2008 for my database connectivity.

    I have uploaded both of my database as well as webapplication to my hosting space.
    Now I am getting login failed for user 'S01\GUEST'

    I suppose this is the problem with the connection string placed in my web.config file here is the connection string:

    <connectionString="Data Source=tcp:s01.Winhost.com;Initial Catalog=my_database;User ID=my_user_id;Password=password; Integrated Security=True;" providerName="System.Data.SqlClient"/>



    [​IMG]


    Thanks
    Shankbond
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Try removing tcp from tcp:s01.Winhost.com and just use s01.Winhost.com. Make sure you are typing the correct database password. Bare in mind your Account passwords, FTP password, SQL password, and email password are separate passwords and can be changed without affecting each other.
     
    Last edited by a moderator: Oct 14, 2015
  3. FredC

    FredC Winhost Staff

    the problem is with your connection string.

    <connectionString="Data Source=tcp:s01.Winhost.com;Initial Catalog=my_database;User ID=my_user_id;Password=password; Integrated Security=True;" providerName="System.Data.SqlClient"/>

    Set this to Integrated Security=False
     
    Last edited by a moderator: Oct 14, 2015
  4. Hi, I have the same error message, however, I tried both suggestion above and neither worked. I used SQL server management studio connecting to database on the Winhost, and use the connectionstring Winhost suggested. Thus I think I connected to the right database and using the correct password. Only one thing I could think of but not know how to configure is the permission. And since the account I use to login is the database owner, it should not be the issue.

    Here is my error message:

    Login failed for user 'UserName'.
    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 'UserName'.

    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 'UserName'.]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849719
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
    System.Data.SqlClient.SqlConnection.Open() +122
    System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1297
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
    System.Web.UI.WebControls.GridView.DataBind() +4
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
    System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +17
    System.Web.UI.Control.PreRenderRecursiveInternal() +80
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
     
    Last edited by a moderator: Oct 14, 2015
  5. Ray

    Ray

    Make sure you are typing the correct db login credentials. If you are using one of the kb articles connection string example you will need to change the values being passed in the connection string.
     
  6. problem solved! thanks a lot. It's my bad that mess up the passwords for login and for db.
     

Share This Page