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)