The connection string 'DefaultConnection' in the application's configuration file does not contain the required providerName attribute."

Viewed 330

Just trying to publish my first MVC app to Godaddy Plesk hosting. My app is working just fine running on localhost on my machine but when deploy it to host(used webdeploy ) whenever i try to run some database stuff (used EF -code first) i get: The connection string 'DefaultConnection' in the application's configuration file does not contain the required providerName attribute." error.

Here is my connection string add name="DefaultConnection" connectionString="Data Source=myserverIP;Network Library =DBMSSOCN;Initial Catalog=mydatabase;User ID=myuser;Password=mypass;" providerName="System.Data.SqlClient"

The strangest thing is that when I use this connection string on my local development machine instead of default "...Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename etc..." string, App runs just fine and I see data stored in database on godaddy hosting. Also I connect to this database from Microsoft SQL Server Managament Studio using credentials from conncetion string above and without any problem run querys

Hope somebody can help me out thanks in advance

0 Answers
Related