Unable to connect to SQL & login in ASP.NET MVC web application.
But I am able to connect & retrieve all other data. Only login & register are not working. I don't know what's wrong.
Login:
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[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. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
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, SqlAuthenticationProviderManager sqlAuthProviderManager) +1077
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +802
Other Controller
Connection String
metadata=res://*/CouriersHubEntity.csdl|res://*/CouriersHubEntity.ssdl|res://*/CouriersHubEntity.msl;provider=System.Data.SqlClient;provider connection string="Data Source=xx.xx.xx.xx;Initial Catalog=CouriersHubDB;Persist Security Info=True;User ID=xxxxxx;Password=hidden;App=EntityFramework"
Your connection to sql server/database failed, please check your connectionstring, you can try to connect to sql server via management studio to make sure credentials are correct.
User contributions licensed under CC BY-SA 3.0