MVC 3.0 deployment in various versions of IIS

Source: Internet
Author: User

Original: MVC 3.0 deployment in various versions of IIS

Overview:

Recently in an MVC 3 project, in the deployment of the server is a waste of time, special process to organize down, I hope to help everyone!

This article mainly describes the installation of MVC 3 in IIS5.1, IIS6.0, IIS7.5, the specific way!

Text:

IIS5.1

1. Install the Microsoft. NET FrameWork 4.0 installation package;

2. Install ASP. NET MVC 3;

3. Publish the Web site in IIS, create the virtual directory, ASP. NET version selection 4.0.30196;

4. Add MVC parsing:

Right-click the virtual directory in IIS select Properties-Virtual directory-configuration-mappings-add, configured as follows:

Executable file: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30196\aspnet_isapi.dll,

Extension:. *

Action: All actions

Scripting Engine: Check

Check if file exists: unchecked

Click OK, as shown in the last example:

IIS6.0

1. Install the Microsoft. NET FrameWork 4.0 installation package;

2. Install ASP. NET MVC 3;

3. Set the "ASP. NET v4.0.0.30319" in the Web extension service to allow, as shown in:

4. Publish the Web site in IIS, create the virtual directory, ASP. NET version selection 4.0.30196;

5. Add MVC parsing:

Right-click the Web site in IIS select Properties-Home Directory-Configuration-mappings-insert, configured as follows:

Executable file: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30196\aspnet_isapi.dll,

Verify that the file exists: unchecked

Click OK, as shown in the last example:

IIS7.5

1. Install the Microsoft. NET FrameWork 4.0 installation package;

2. Install ASP. NET MVC 3;

3. Set the "ASP. v4.0.0.30319" in "ISAPI and CGI restrictions" for IIS to allow, as shown in:

4. Publish the Web site in IIS;

5. Edit the application pool for the Web site and set the. NET Framework version to 4.0.30196;

Precautions:

1. NET Framework4:

Http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=0A391ABD-25C1-4FC0-919F-B21F31AB88B7

2. MVC 3:

Http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d2928bc1-f48c-4e95-a064-2a455a22c8f6

3. If IIS is installed after the NET Framework is installed, please re-register the NET Framework in IIS and enter it in the run:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe-i

4. If you want to compile for. NET Framework 4.0 or later, the value of the "CompilerVersion" attribute in the provider option must be "v4.0" or a later version. To compile this Web application against the. NET Framework version 3.5 or earlier, remove the targetframework attribute from the <compilation> element of the Web. config file. " error, please refer to the code below to modify or add the Configuration--system.codedom configuration section in Web. config of the website:

<system.codedom> <compilers> <compilerlanguage="C#;cs;csharp"extension=". CS"type="Microsoft.csharp.csharpcodeprovider,system, version=2.0.0.0, Culture=neutral, publickeytoken= b77a5c561934e089"WarningLevel="4"> <provideroptionname="CompilerVersion"value="v4.0"/> <provideroptionname="warnaserror"value="false"/> </compiler> <compilerlanguage="Vb;vbs;visualbasic;vbscript"extension=". vb"type="Microsoft.VisualBasic.VBCodeProvider, System, version=2.0.0.0, Culture=neutral, publickeytoken= b77a5c561934e089"WarningLevel="4"> <provideroptionname="CompilerVersion"value="v4.0"/> <provideroptionname="Optioninfer"value="true"/> <provideroptionname="warnaserror"value="false"/> </compiler> </compilers> </system.codedom>

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.