<connectionStrings>
<add name="connectionString" connectionString="Data Source=127.0.0.1\sqlserver;Initial Catalog=test;Persist Security Info=True;User ID=sa;Password=123456" providerName="System.Data.SqlClient" />
</connectionStrings>
<connectionStrings>
<add name="connectionString" connectionString="server=127.0.0.1;uid=sa;pwd=123456;database=test" />
</connectionStrings>
配置工具->sql server外围应用配置器->服务和连接的外围应用配置器->打开MSSQLSERVER节点下的Database Engine 节点,先择"远程连接",接下建议选择"同时使用TCP/IP和named pipes"