Expecting non-empty string for 'providerInvariantName' parameter. Description: 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.
Exception Details: System.ArgumentException: Expecting non-empty string for 'providerInvariantName' parameter.
Fig. 1 Error page showing providerInvariantName parameter error for asp.net web application's database connection error |
My connection string is:
<connectionStrings>And accidentally it was broken like:
<add name="ConnectionString" connectionString="data source=my-pc;Integrated Security=true;Initial Catalog=mydbname"
providerName="System.Data.SqlClient" />
</connectionStrings>
<connectionStrings>I was stunned to get the error when I had just finished uploading the web application to my host. After some googling, I found the cause and fixed the error. It worked. Happy programming!
<add name="ConnectionString" connectionString="data source=my-pc;Integrated Security=true;Initial Catalog=mydbname" />
</connectionStrings>