Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Line 16:         {
Line 17:             connection.ConnectionString = GetConnectionString();
Line 18:             connection.Open();
Line 19:         }
Line 20: 
  

 Source File:  F:\PAF\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\Utilities\FileUtilities.cs    Line:  18 

Stack Trace: 



[SqlException (0x80131904): Login failed for user 'FileLoader'.]
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) +970
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +802
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) +38
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +507
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +154
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +21
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +141
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +362
   System.Data.SqlClient.SqlConnection.Open() +96
   ASPNetFileUpDownLoad.Utilities.FileUtilities.OpenConnection(SqlConnection connection) in F:\PAF\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\Utilities\FileUtilities.cs:18
   ASPNetFileUpDownLoad.Utilities.FileUtilities.GetFileList() in F:\PAF\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\Utilities\FileUtilities.cs:27
   ASPNetFileUpDownLoad.Default.Page_Load(Object sender, EventArgs e) in F:\PAF\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\ASPNetFileUpDownLoad\Default.aspx.cs:16
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2952

  


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0 


What I have tried:

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.
Posted
Updated 17-Apr-16 5:10am
Comments
F-ES Sitecore 17-Apr-16 11:03am    
The user you're connecting to your database as isn't a valid user, the error is fairly self-explanatory.

1 solution

Use the debugger to look at exactly what your GetConnectionString method returns.
Probably, either the user / password combination do not match, or the user called FileLoader does not have access to that database, or the SQL Server instance is incorrect, or ...
But we can't tell - we don't have your code, we don't know how your method works, and we don't know what it returns. And even if we did, we don't have access to your SQL server instance to check it!

So it's up to you. Look at the string, look at the server. See what information you can gather!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900