wcf entity framework change to non standard sql port RRS feed

  • Question

  • Hi we are using tcp/ip to connect to sql server using entity framework on wcf.  This was developed against a standard sql instance i.e. using port 1433.  Having moved the application to an environment with that port closed and using a different port can I just modify the connection string or do I have update the model from the database(with changes using new port).  I am trying this as a connection string with no luck.

    <add name="Entity" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=mydbserver,port#;Initial Catalog=dbname;Persist Security Info=True;User ID=myuser;Password=mypassword;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

    this is not working and is throwing an archaic error.  I have built a console app wich uses a regular connection string and it works fine e.g.

    <add connectionString="Data Source=mydatasource,port#;Initial Catalog=mydatabase;User Id=myuser; Password=mypassord;" name="Entity"/>

    any thoughts would be appreciated.

    Wednesday, September 26, 2012 1:48 PM

All replies