Force the TCP/IP protocol in connection string

2020-03-12 11:24发布

问题:

i have a database driven website written in asp.net. i'd like to modify the connection string to force protocol TCP. Please advise. Thanks!

回答1:

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