C # link remote SQL Server methods
The first step: apply for the Peanut shell intranet version, require 1 dollars to the Peanut shell server to do the verification.
Step two: Put your own host local connection where the intranet address does not automatically get, written as 192.168.0.105, subnet mask 255.255.255.0, default gateway 192.168.0.1
The third step: landing the peanut shell, will automatically generate a mysql.imwork.net domain name, the right mouse button to select the new peanut Shell management----ADD mapping---The current host---The application name casually write, intranet host write your native intranet 192.168.0.105, port mapping 1433, Then generate an extranet access address mysql.imwork.net:27141, remember that this address is the name you write in the C # Statement of the database connection string remote database!!!
The fourth step, the SQL Server to open the remote access mode, this Baidu a search a lot. Not much to say
Fifth step, the database connection string writes public static string conn_string = system.configuration.configurationmanager.connectionstrings["BB"]. ToString ();
Sixth step, in the app. config file
<add name= "BB" connectionstring= "Data source=mysql.imwork.net,27141;initial Catalog=aa; Persist Security info=true; User Id=sa; password=123456789 "
Seventh Step, test
C # link remote SQL Server methods