This info would essentially be a duplicate of my question. I'm at a loss (and yes, I include the providerName property in the connection string key in web.config).Ġ) I inspected the connection string at the point of failure, and it is an accurate representation of the way it's specified in the web.conf file.ġ) The next database call in the app startup (both calls are in the same controller method) succeeds.Ģ) The stored proc in question is expecting a string that can be no longer than 36 characters, and the string I'm passing is only 32 characters.ģ) It fails when I try to create the SqlConnection object, so the stored proc itself is not a factor in the failure.Ĥ) If I move this call to follow another database call (that succeeds), this call still fails when I try to create the SqlConnection object.
Mvc sql server connection string windows#
On the Windows development machine it is using localdb.
I have created a simple ASP.NET Core MVC application using EF Core and SQL Server. This led me to think there was something wrong with the stored proc, but sql server manager reports no errors, and I'm using the correct name and SqlParameter list. SQL Connection string issue when deploying ASP.NET Core MVC to Azure App Service (Linux) asp.net-core asp.net-mvc azure-sql-database entity-framework-core. If I comment out the call to hit the stored proc, ALL OTHER DATABASE TRANSACTIONS (using the same connection string) PROCEED NORMALLY. This call fails with the exception Keyword not supported 'initial catalog' when I try to create a SqlConnection object with the connection string.
So I'm cruising along developing a MVC5 web site, and everything is going pretty well, including using stored procs from the database.