C # link remote SQL Server methods

Source: Internet
Author: User
Tags net domain
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.