Database Connection error

Discussion in 'Databases' started by emjsync, Mar 2, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    I am trying to connect to my discountasp.net database from my visual studio web application. The server explorer in visual studio seems to connect very well, but whe i start up the form I get the following error. Also When I try to access it online I get the same error. The 'DB_222395_ctesurvey_user' is the user name assigned by discountasp.net



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

    Source Error:





    Code:
    Line 26: 		{
    Line 27: 			
    Line 28: 				sqlDataAdapter1.Fill(dataSet11);
    Line 29: 				DataGrid1.DataBind();
    Line 30: 			
    Source File: c:\inetpub\wwwroot\cteonlinesurvey12\webform1.aspx.cs Line: 28

    Stack Trace:





    Code:
    [SqlException: Login failed for user 'DB_222395_ctesurvey_user'.]
       System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
       System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
       System.Data.SqlClient.SqlConnection.Open()
       System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
       System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       cteOnlineSurvey12.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\cteonlinesurvey12\webform1.aspx.cs:28
       System.Web.UI.Control.OnLoad(EventArgs e)
       System.Web.UI.Control.LoadRecursive()
       System.Web.UI.Page.ProcessRequestMain()
    
     
  2. This error is being generated from the sql server. for some reason either no password or the wrong password is being sent.

    double check the connection username and string password and make sure it match the user / password you are using.

    also try to output the connection string right before connect, just to be sure that is the connection string you are using.


    Joel Thoms

    DiscountASP.NET
    http://www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page