The article ". NET 4.0 getting started with network development series"-No network wins (below)

Source: Internet
Author: User

 

3. Build a network development and testing environment

(1) Visual Studio 2010 is installed.

Any version of Visual Studio 2010 is available, including the free learning version. This series of articles does not require the advanced features of Visual Studio 2010.

(2) testing network programs on a single machine is not enough. You need to prepare two computers to test your programs in a real network environment.

If it is difficult to prepare two physical computers, you can install the virtual machine. Common Virtual Machine software include VMware, Virtual PC, and Virtualbox. These Virtual machine software are used similarly.

I am using Virtual Box, this is an open source software, you can access the http://www.virtualbox.org/wiki/Downloads to download Virtualbox, the latest version is 3.2.10, the installation package is 75 M.

After the installation, start VirtualBox and click "new". VirtualBox starts a wizard to help you create a virtual machine. You need to provide a CD image for Windows operating system installation, and then follow the wizard step by step (Figure 3 ):

 

Figure 3

After creating the virtual machine, start it and select "Assign Optical Drive" and "more virtual discs" from the "device" menu (figure 4 ):


Figure 4

In the window that appears, click "register" and select the Windows Installation File (figure 5 ):

 


Figure 5

Restart the VM.

After the VM is started, select the "Install enhancement" option from the "device" menu, which greatly facilitates the use of virtual machines.

Virtualbox is easy to use and provides a detailed user manual (in English). To save space, we will not describe it in detail here. Only a few important items are listed:

(1) we recommend that you install Windows Server 2008/Vista/Windows 7 on a virtual machine. These new operating systems include more and more updated network functions than earlier versions, however, this requires a high configuration of your "physical" machine. We recommend that you provide 1 GB of memory for the virtual machine.

My computer is configured as follows: the host has 4 GB memory and runs Windows 7 Professional (64-bit). The VM allocates 1.5 GB memory and runs Windows Server 2008 R2 (64-bit ), it may be because of the high performance of my computer that the virtual machine runs smoothly.

(2) install. NET 4.0 on a virtual machine separately. You can find an independent. NET 4.0 installation package in the WCUdotNetFramework folder of the VS2010 installation disc, or download it from the Microsoft website.

(3) to enable the virtual machine to connect to the network, the key here is that you must correctly set the NIC type of the virtual machine. To allow the host machine and virtual machine to access each other, configure the NIC as follows:

 


Figure 6

If you set it to "Bridged Adapter", the host machine and the virtual machine can "see each other". In addition, if you select "insert network cable", the virtual machine will automatically connect to the network when it starts.

(4) set a shared folder between the VM and the host (figure 7 ).


Figure 7

Click the "+" icon on the right to add a shared folder to the VM and the host.

Start the VM.

After completing the above work, You can first encode the program in the "Physical Machine". When you need to test the program in the network environment, copy the program to be tested to the shared folder, and then start the virtual machine, copy the program to the virtual machine using the shared folder.

The following is my network development environment (figure 8 ).

 

Figure 8

As shown in 8, "JINXULIANG-SERV" is my host computer, MYSERVER is our installed Windows virtual machine, and VBOXSVR is VirtualBox virtual machine, the "Data Space" We added earlier will become the "Network shared folder" for this computer ".

 

It should be pointed out that although virtual machines and host machines can better simulate a network environment, they are "virtual" only in a real network environment, only by running programs on multiple real physical machines can network applications be tested. However, it is more convenient to use virtual machines for testing in the development phase to learn about software technology. Only after the program is basically developed, it can be transplanted to the real network environment for testing.


Well, the opening speech is too long. Stop.

Finally, leave a homework assignment for the reader:

Follow the instructions in this article to build your network development environment and prepare relevant technical books and materials.


Next, let's start with the simplest IP address. the class related to the IP address in the NET base class library, and we started to be "Exciting. NET network development technology adventure

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.