asp.net 2.0来! As we get excited about the new features of ASP.net 2.0, I think a lot of asp.net developers are very concerned about the question: How about asp.net 2.0 compatibility? Can the program developed by ASP.net 1.1 run directly on ASP.net 2.0?
In the SDK documentation, there is a description of the compatibility of the. NET Framework 2.0: "The. NET Framework provides a high degree of support for backward compatibility. For example, most applications created using version 1.0 would run on version 1.1 and applications using version 1.1 would r UN on version 2.0. ".
After reading this description, I thought: if the ASP.net 1.1 development of the program can really run directly on the ASP.net 2.0, that would be great, but ASP.net 2.0 relative to 1.1 changes so large, it is difficult to achieve such compatibility, Microsoft has always been very attached to backward compatibility, we should have expectations. If compatibility is not ideal, migrating from ASP.net 1.1 to ASP.net 2.0 can have significant costs and risks. The program that you develop can be recompiled on ASP.net 2.0, the third party component that can be used in the program?
Let's do an experiment with the blog Park program. Without making any changes to the program, switch asp.net to 2.0 directly in IIS Manager and change the *.* mapping to ASP.net 2.0.
The program is installed in the local blog virtual directory, first I access the address: Http://localhost/blog (as a wildcard mapping is established, IIS does not change the address to http://localhost/blog/default.aspx), The first error occurred:
There is no builds provider registered for the extension '. Can register one in the <compilation><buildProviders> section in Machine.config or Web.config. Make sure are has a Buildproviderappliestoattribute attribute which includes the value ' Web ' or ' all '.
In ASP.net 1.1, this access is normal, as a wildcard mapping is established and requests are Web.config <add verb= "*" path= "*" type= Dottext.common.urlmanager.urlrewritehandlerfactory,dottext.common "/> Processing. In ASP.net 2.0, the requested resource needs to have a buildprovider to process (set in <buildProviders>), while access to Http://localhost/blog does not include the filename, ASP. NET 2.0 is considered to be a file with an empty extension, and the corresponding buildprovider cannot be found to process (if an ASPX file, the default buildprovider is System.Web.Compilation.PageBuildProvider ), so the error is generated. I think we should be able to solve this problem by adding a buildprovider in <buildProviders> to handle this kind of request, but I have a problem with setting up: extension how to set? I tried several of the following settings:
<add extension=".*" type="System.Web.Compilation.PageBuildProvider" />
<add extension="*" type="System.Web.Compilation.PageBuildProvider" />
<add extension="*.*" type="System.Web.Compilation.PageBuildProvider" />
<add extension="" type="System.Web.Compilation.PageBuildProvider" />(这个设置根本不允许)
I do not know that I did not find a way to set up, or extension does not support the wildcard character? If this is the latter, this is a compatibility issue. But this kind of situation is quite special, the general ASP.net procedure does not encounter this kind of situation. If it is not possible to solve the problem, it is similar. Text this way the use of wildcard mapping will become history. If anyone knows the solution, I hope to get your advice.