开发者

Force the TCP/IP protocol in connection string

开发者 https://www.devze.com 2023-01-30 02:51 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消