C# .NET - Add port number to connection string in windows forms

Asked By Dom Afonso on 02-Jul-12 10:48 PM
I am using the above connection string with PORT NUMBER in windows application and it does not work!

<connectionStrings>
    <add name="Remote.Properties.Settings.dbFilesConnectionString"
         connectionString="Data Source=tcp:192.168.1.99,1434\SQLEXPRESS;Initial Catalog=dbFiles;User ID=Mile;Password=********;Connect Timeout=30;User Instance=False"
        providerName="System.Data.SqlClient" />
</connectionStrings>

If I relace "tcp:192.168.1.99,1434" with 192.168.1.99 the windows form displays data but if the replacement is not done, it does not.
Does anyone know how to correctly include a port number in c# windows forms?
Robbe Morris replied to Dom Afonso on 02-Jul-12 11:01 PM
Remote connectivity in sql express is disabled by default:

http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx

Also, I'm pretty sure you do not need "tcp:" in your data source.  I also believe that port 1434 is the default for sql express.  So, you don't need that either.