This example uses the default ASP. NET MVC4 Web application for Visual Studio 2012. IIS default IIS8 for Windows 8.1 comes with
I've been developing it with an ASP. The IIS deployment of the ASP. NET Web site is very simple, just copy your working files to the IIS Web site directory.
The first contact with MVC4 to make himself full of sweat, all kinds of not fit. Today, whether it's a MVC4 Web application or an ASP. NET Web site, their ultimate goal is to run on-line, and not every time you press F5 in Visual Studio, you begin to explore the MVC4 Web application you are practicing to publish to IIS.
One, install IIS
1. Press keyboard win+r to enter control in the Open Run box
2. Tap: "Programs" = "Turn Windows features on or off" in the dialog box that opens to find "Internet Information Services" and "Internet infomation Services hostable Web Core "two items and tick. Click "+" on "Internet information Services" to find "world Wide Web Services" tap "+" to find application development Features Click "+" to "find" ASP. NET 3.5 "and" ASP. 4.5 "are checked. (If you do not tick these two items will appear inexplicably wrong HTTP error 500.19-internal Server error.) Even if it's already installed on your machine. NET4.5, too.
3. Click OK to wait for the installation to finish. IIS installation Complete
Ii. Publishing a Web application
1. Right-click on your Web application project and click "Publish"
2. Create a new configuration file, just a name, here is MVC4.
"Next" Publish method Select "File System" (PS: I was posted on the computer, if you want to publish to the remote server, according to your needs), "Target location" Select your site's storage directory, here is "G:\WEB\MVC4"
"Next" Configuration Select "Release"
Click "Publish", OK, your website file has been generated.
Third, add our MVC4 in IIS
1. Open IIS, right-click on sites, add Web site
2. Enter site Name in the dialog box that pops up, enter "MVC4" here to select Application Pool, where ". NET v4.5" is selected
3. Select the site file storage path, here is "G:\WEB\MVC4"
4. Set the site binding port, set here to: 81 (default = 80)
5. Click OK to finish.
Enter "http://localhost:81/" in the browser to access our website ^_^.
Hope to be of help to you.
How to publish an MVC4 Web application to IIS