User-2006371901 posted
I have an MVC5 app, uses Aspnet Identity provider, when I try logging in to a page, I get "The system cannot find the file specified " , further more it is pointing to sql > [Win32Exception (0x80004005): The system cannot find the file specified]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
Checking thru online resources, connection string may be the issue, I am using remote SQL server, I commented out the reference to LocalDB, but still get the error
connection string in webconfig :
<connectionStrings>
<!-- <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-MyProj-20191016092040.mdf;Initial Catalog=aspnet-MyProj-20191016092040;Integrated Security=True" providerName="System.Data.SqlClient"
/>-->
<add name="MyDBASEEntities" connectionString="Data Source=myserver.net;initial catalog=MyDBASE;persist security info=True;user id=Sales123;password=zzzzzz;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"
/>
</connectionStrings>
the "The system cannot find the file specified " error is pointing to the line in my accountcontroller >
Line 76: // This doesn't count login failures towards account lockout
Line 77: // To enable password failures to trigger account lockout, change to shouldLockout: true
Line 78: var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
Line 79: switch (result)
Line 80: { ..
[Win32Exception (0x80004005): The system cannot find the file specified]
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
??
Ned