title: How do I put connection string with IP Address inside web.config file?
body: <p>We are currently using the following connection string in our web.config file:</p>
  
  <pre><code>add name="DBConnectionString" connectionString="Data Source=ourServer;Initial Catalog=ourDB;Persist Security Info=True;User ID=theUserName;Password=thePassword" providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>This works fine. However, this app needs to be pushed to our external server. This means, according to our infrastructure team that we will need a connection string with ip address and port 1433 to be able to connect the app to our db which is not on the same external server.</p>
  
  <p>I have tried any of the two connection strings below but they don't work.</p>
  
  <p>The first one doesn't error out but just doesn't recognize the db. I suspect it is because of this bit </p>
  
  <pre><code>tcp:10.database.windows.net
  </code></pre>
  
  <p>Do I need to replace it with IP Address? I am told I need the tcp in there.</p>
  
  <pre><code>&lt;add name="DBConnectionString" providerName="System.Data.SqlClient" connectionString="Data Source=tcp:10.database.windows.net,1433;Initial Catalog=POLLWORKER_TRAINING;Integrated Security=False;User Id=pworker;Password=pworker;Encrypt=True;MultipleActiveResultSets=True" /&gt;
  </code></pre>
  
  <p>This last one is causing an error which says, </p>
  
  <blockquote>
    <p>the element connectionStrings cannot contain text. List of possible elements expected, "add", "remove", "clear"</p>
  </blockquote>
  
  <pre><code>&lt;add name="DBConnectionString" connectionString="Provider=sqloledb;Data=10.22.5.20,1433;Network Library=DBMSSOCN;Initial Catalog=ourDB;User ID=theUserName;Password=thePassword" /&gt;
  </code></pre>