Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

Not associated with a trusted SQL Server connection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex - 28 Mar 2008 10:05 GMT
When .aspx try to connect SQL server then show the following error, Any idea?
I already try to change Authentication mode to "SQL Server and Windows" but
still get the following error.
===================================================
Server Error in '/' Application.

Login failed for user 'fancywebadmin'. Reason: Not associated with a trusted
SQL Server connection.
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
'fancywebadmin'. Reason: Not associated with a trusted SQL Server connection.

Source Error:

Line 25:
Line 26:             SqlConnection conn = new
SqlConnection(ConfigurationSettings.AppSettings.Get("connectionString"));
Line 27:             conn.Open();
Line 28:             String HashedPassword =
FormsAuthentication.HashPasswordForStoringInConfigFile(password, "SHA1");
Line 29:

Source File: z:\fancydesignweb\login.aspx.cs    Line: 27

Stack Trace:

[SqlException (0x80131904): Login failed for user 'fancywebadmin'. Reason:
Not associated with a trusted SQL Server connection.]
  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +739123
 
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
  System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1956
  System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33
  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +170
  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349
 
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181
 
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
  login.Page_Load(Object sender, EventArgs e) in
z:\fancydesignweb\login.aspx.cs:27
  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o,
Object t, EventArgs e) +15
  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e) +34
  System.Web.UI.Control.OnLoad(EventArgs e) +99
  System.Web.UI.Control.LoadRecursive() +47
  System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
===================================================
John Bell - 28 Mar 2008 10:23 GMT
Hi Alex

Have you granted a login to this user directly or indirectly?

John

> When .aspx try to connect SQL server then show the following error, Any idea?
> I already try to change Authentication mode to "SQL Server and Windows" but
[quoted text clipped - 79 lines]
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
> ===================================================
bass_player - 28 Mar 2008 11:39 GMT
Changing the Authentication method to SQL Server and Windows is one thing
but you need to restart the SQL Server service for the changes to take
effect

> When .aspx try to connect SQL server then show the following error, Any
> idea?
[quoted text clipped - 90 lines]
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
> ===================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.