I have a d开发者_运维知识库atabase driven website written in asp.net. I'd like to modify the connection string to force protocol TCP. Please advise.
<add name="TESTConnectionString"
connectionString="Data Source=SERVER201;Initial Catalog=DB201;Persist Security Info=True;User ID=201User;Password=123!@#"
providerName="System.Data.SqlClient" />
You can use server=tcp:hostname
in your connection string to achieve this.
For more details, see How to use the server name parameter in a connection string to specify the client network library
精彩评论