title: EDMX connection string SQL server port
body: <p>Does anyone know using an EDMX Connection string in asp.net mvc application, on which port does it connect to SQL Server?</p>
  
  <p>ASP.NET MVC : 4</p>
  
  <p>SQL SERVER Version : 2012</p>
  
  <p>The reason I am asking is because :
  I am able to connect to the same SQL Server using ADO.NET Connection string from my local machine</p>
  
  <p>But when I use the EDMX and use EDMX generated Connection String, I get an error : </p>
  
  <p>The underlying provider failed on Open.</p>
  
  <p>Connection Timeout Expired.  The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement.  This could be because the pre-login handshake failed or the server was unable to respond back in time.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=14680; handshake=14007; </p>
  
  <p>Connection Strings for reference:</p>
  
  <pre><code>&lt;add name="TestConnection" connectionString="Data Source=Server01;Initial Catalog=Tools;User ID=TestUser;Password=TestPWD;Connection Timeout=120" providerName="System.Data.SqlClient" /&gt;
  
  &lt;add name="TestEntities" connectionString="metadata=res://*/Apple.ClassLayer.MIS.csdl|res://*/Apple.ClassLayer.MIS.ssdl|res://*/Apple.ClassLayer.MIS.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=Server01;initial catalog=Tools;persist security info=True;User ID=TestUser;Password=TestPWD;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  </code></pre>