|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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.Ge t("connectionString")); Line 27: conn.Open(); Line 28: String HashedPassword = FormsAuthentication.HashPasswordForStoringInConfig File(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.OnErro r(SqlException exception, Boolean breakConnection) +739123 System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956 System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170 System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349 System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(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.Callier.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(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 ================================================== = |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Hi Alex
Have you granted a login to this user directly or indirectly? John "Alex" wrote: > 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.Ge t("connectionString")); > Line 27: conn.Open(); > Line 28: String HashedPassword = > FormsAuthentication.HashPasswordForStoringInConfig File(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.OnErro r(SqlException > exception, Boolean breakConnection) +739123 > > System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject > stateObj) +188 > System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand > cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet > bulkCopyHandler, TdsParserStateObject stateObj) +1956 > System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean > enlistOK) +33 > System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 > timerExpire, SqlConnection owningObject) +170 > System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String > host, String newPassword, Boolean redirectedUserInstance, SqlConnection > owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349 > > System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection > owningObject, SqlConnectionString connectionOptions, String newPassword, > Boolean redirectedUserInstance) +181 > > System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity > identity, SqlConnectionString connectionOptions, Object providerInfo, String > newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 > > System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection > owningConnection) +359 > > System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 > System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection > owningObject) +424 > System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection > owningObject) +66 > System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection > owningObject) +496 > System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection > owningConnection) +82 > System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(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.Callier.EventArgFunctionCaller (IntPtr fp, Object o, > Object t, EventArgs e) +15 > System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(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 > ================================================== = |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 "Alex" <Alex@discussions.microsoft.com> wrote in message news:99635B18-5E6D-43E7-AFE2-80141C901C7B@microsoft.com... > 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.Ge t("connectionString")); > Line 27: conn.Open(); > Line 28: String HashedPassword = > FormsAuthentication.HashPasswordForStoringInConfig File(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.OnErro r(SqlException > exception, Boolean breakConnection) +739123 > > System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject > stateObj) +188 > System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand > cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet > bulkCopyHandler, TdsParserStateObject stateObj) +1956 > System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean > enlistOK) +33 > > System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 > timerExpire, SqlConnection owningObject) +170 > System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String > host, String newPassword, Boolean redirectedUserInstance, SqlConnection > owningObject, SqlConnectionString connectionOptions, Int64 timerStart) > +349 > > System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection > owningObject, SqlConnectionString connectionOptions, String newPassword, > Boolean redirectedUserInstance) +181 > > System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity > identity, SqlConnectionString connectionOptions, Object providerInfo, > String > newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) > +170 > > System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection > owningConnection) +359 > > System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection > owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 > System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection > owningObject) +424 > System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection > owningObject) +66 > System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection > owningObject) +496 > System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection > owningConnection) +82 > System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(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.Callier.EventArgFunctionCaller (IntPtr fp, Object o, > Object t, EventArgs e) +15 > System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(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 > ================================================== = |
|
![]() |
| Outils de la discussion | |
|
|