Make it possible for others to access the Web site created by ASP. NET MVC on your computer

Source: Internet
Author: User

Recently wrote a website, yesterday just finished, because want to test with friends, but he has no environment on the computer, so I want to deploy on their own computer, let him directly through the browser to access to test, so from last night to this morning, through a variety of search, finally fix.

First of all, let me introduce the environment I use, the website is written using the ASP. NET Framework 4.0 operating system window7. MVC4.0 platform version.

    • 1. Go to Control Panel--Programs and functions--turn window function on or off and then, as shown, tick the Internet Information Service

    • 2. Go to Control Panel-Administrative Tools-internet Information Services (IIS) Manager

Notice we go in here, first click on the right to change the. NET Framework version default is 2.0 we'll change it to 4.0.

Then click ASP under IIS

Then set the Enable parent path to True

    • 3. Now we're ready to create a website.

Site name on their own arbitrarily set on it, the application pool is very important, I choose to exist here, you can also create a new one yourself. The IP address is set to the IP address of your computer. And then determine.

The application pool version is very important, the application default is 2.0 version, must be changed to 4.0 version, or when you visit the site, the configuration file this sentence will be error

If you are using a 4.0 framework, then you must set the version of the application pool you are using to V4.0

There's a little bit to see

The 4.0 version is not banned.

It is also important to note that if we install 4.0 but in the above to set the version of the place and find no 4.0 option , then it should be for you IIS first use after installation, we need to run the command line as an administrator, and then enter C:\WINDOWS\ Microsoft.net\framework\v4.0.30319\aspnet_regiis.exe–i can do it.

Now we click on the right to browse the page, the result also reported wrong, the solution, to the C/windows/temp attribute security, to the IIS user set the readable writable permission, so that the site can be accessed smoothly.

But outside the network is still inaccessible, if you are connected to a router, LAN is accessible, outside the network we want to set a forwarding rule, each router's settings are not the same, my is the polar route, set as follows:

The rule is that when someone accesses your extranet IP, you can switch to the corresponding IP within the LAN. One thing to note here is that, like an extranet IP and a WAN port IP, if it's not the same, it's possible that you're connected to more than one router. And my is because the telecommunications broadband is not bridged, the cat is equivalent to a router, so I called the telecom to call him to bridge the way, the general need to dial the bridge mode, and then this is done. It's a very fulfilling feeling.

My IP is

Then access Port 4040

is not very simple.

Make it possible for others to access the Web site created by ASP. NET MVC on your computer

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.