Urlrouting during ASP. net4.0 deployment on iis7

Source: Internet
Author: User

Today, a small web project of the company is taken from ASP. net3.5 upgrade to ASP. net4.0, The results encountered a series of tangled problems on urlrouting. (Note: URL routing is ASP. net4.0 is a new feature. If you are new to net4.0, click ASP here. new net4.0/vs2010 changes (3): URL routing can also be used in webform)

 

In the vs2010 development environment, everything runs normally. After the result is deployed on iis7, the following problem is first encountered:

I'm sure ASP. net4.0 on the server has been enabled (for example), and the corresponding website applicationProgramThe pool is switched to 4.0, but this is still the case!

Some people found similar problems on the msdn Forum. solution:

First, check whether Beta or RC versions earlier than 4.0 are installed on the machine, such

The official version of. Net framework4 is 4.0.30319. If you have installed the 4.0 framework of the old version (for example, v4.0.30128), enter:

C: \ windows \ Microsoft. NET \ framework64\ V4.0.30319> aspnet_regiis.exe-I

Re-register the. net4 official version to IIS

Note: If the server is a 64-bit system ,. net will install the 64-bit framework synchronously. If it is a 32-bit system, there is no framework64 directory. After this operation, check whether the application pool version in IIS is the official version number.

 

After this process, the website can run, but the second problem is encountered:

For example, because the company's project applies some previous third-party components, the application pool cannot run in the integrated integration mode (incompatible), so you can only select the Classic mode, after practice, it is found that the URL routing function is unavailable in Classic Mode:

 

After Baidu circled it, the solution was found: In the feature view of the website, locate handler ings (handler ing) and double-click

Add a wildcard script map, as shown in figure

That is, all requests with all suffixes are handled by framework64 \ v4.0.30319 \ aspnet_isapi.dll.

 

OK. The routing function of ASP. net4.0 is running normally in the Classic mode (Note: if it is in the integration mode, there is no such problem)

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.