I have an old system using .NET 4.0, ASP.NET, Entity Framework, C# and SQL Server 2014.
I keep getting this error when trying to run the system, it used to work before!
Server Error in '/' Application.
Keyword not supported: 'server'.
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.Stack Trace:
[ArgumentException: Keyword not supported: 'server'.]
System.Data.EntityClient.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Hashtable synonyms) +10219986
System.Data.EntityClient.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms) +114
System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +400
System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +56
Providers.ssirsMembershipProvider.GetFailedPasswordWindowForUser(String username) +111
_Default.Login2_LoginError(Object sender, EventArgs e) +119
System.Web.UI.WebControls.Login.OnLoginError(EventArgs e) +139
System.Web.UI.WebControls.Login.AttemptLogin() +11591419
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +111
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1890
It has something to do with my connection string in my web.config:
<connectionStrings>
<add name="myConnectionString"
connectionString="server=svrDatabases;database=MyDatabase;uid=myuser;pwd=*****"
providerName="System.Data.SQLClient" />
<add name="myEntities"
connectionString="metadata=res://*;provider=System.Data.SqlClient;provider connection string="Data Source=svrDatabases;Initial Catalog=MyDatabase;Persist Security Info=True;User ID=myuser;Password=*****;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient" />
</connectionStrings>
I have tried changing the providername to EntityClient, doesn't make any difference.
Banging my head against a wall.
Can someone help, please?
Thanks
SQL Server connection entry should look like this (when using SQL Server authentication):
For more options check https://www.connectionstrings.com/sql-server/