Login failed for user ''. The user is not associated with a trusted SQL Server connection.

Discussion in 'ASP .Net' started by Dennis, Jun 26, 2006.

  1. Dennis

    Dennis Guest

    I am working on an ASP.NET 2.0 site. It runs fine on my local PC.
    When I deploy it to the server I get this error:

    Login failed for user ''. The user is not associated with a trusted SQL
    Server connection.

    SqlException (0x80131904): Login failed for user ''. The user is not
    associated with a trusted SQL Server connection.]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection) +734867

    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj) +188
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
    SqlCommand cmdHandler, SqlDataReader dataStream,
    BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    +1838
    System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
    enlistOK) +33

    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
    owningObject, SqlConnectionString connectionOptions, String
    newPassword, Boolean redirectedUserInstance) +628

    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
    identity, SqlConnectionString connectionOptions, Object providerInfo,
    String newPassword, SqlConnection owningObject, Boolean
    redirectedUserInstance) +170

    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
    options, Object poolGroupProviderInfo, DbConnectionPool pool,
    DbConnection owningConnection) +359

    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
    owningConnection, DbConnectionPool pool, DbConnectionOptions options)
    +28
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
    owningObject) +424

    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject) +66
    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
    owningObject) +496

    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    owningConnection) +82

    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory) +105
    System.Data.SqlClient.SqlConnection.Open() +111
    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
    DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
    srcTable, IDbCommand command, CommandBehavior behavior) +121
    System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32
    startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior
    behavior) +162
    System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +107
    CustomerDataTableAdapters.CustomerTableAdapter.GetDataByAll() +91

    [TargetInvocationException: Exception has been thrown by the target of
    an invocation.]
    System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
    arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
    RuntimeTypeHandle typeOwner) +0
    System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
    arguments, Signature sig, MethodAttributes methodAttributes,
    RuntimeTypeHandle typeOwner) +72
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
    invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
    Boolean skipVisibilityChecks) +296
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
    invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    +29

    System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod
    method, Boolean disposeInstance, Object& instance) +482

    System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments
    arguments) +2040
    System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92
    System.Web.UI.WebControls.ListControl.PerformSelect() +31
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26
    System.Web.UI.Control.PreRenderRecursiveInternal() +77
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +1360


    We are using integrated security so I don't have a username specified
    in the connection string. What am I missing?
    Dennis, Jun 26, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page