System.ArgumentException: The 'data source' keyword is not supported

Jun 22, 2012 at 8:19 PM
Edited Jun 22, 2012 at 8:22 PM

Using Entity Framework v4.0.30319 in a webservice, Database first, getting the above error.  Followed the short instructions as indicated in the quickstart.

Connection string is in machine.config, like:

<add name="MYCONNECTION" connectionString="Data Source=localserver;Initial Catalog=MyCatalog;Integrated Security=true;" providerName="System.Data.EntityClient" />

Inherited context extension is:

public partial class MyDataContextExtended : MyDataContext {
	public MyDataContextExtended() : this("MYCONNECTION") { }
	
	public MyDataContextExtended(string connectionString)
		: base(EFTracingProviderUtils.CreateTracedEntityConnection(connectionString)) {
		this.EnableTracing();
	}
}

used in the project as

DataContext = new MyDataContextExtended(/*connectionString*/);
// or
DataContext = new MyDataContextExtended(connectionString);

I've tried a bunch of different variations on the connection string, including omitting providerName from config setting, specifying name=MYCONNECTION for the value passed to the CreateTracedEntityConnection method, as well as specifying a "more complete" entity connection string:

metadata=res://*/;provider=System.Data.SqlClient;provider connection string="Data Source=localserver;Initial Catalog=MyCatalog;Integrated Security=true;MultipleActiveResultSets = True;"

the last of which gives me a different error: "String cannot have zero length".

 

Any help?