asp.net 2.0来了! 在我们为asp.net 2.0的新特性感到激动的同时,我想很多asp.net开发人员非常关心这样一个问题:asp.net 2.0的兼容性怎么样?asp.net 1.1开发的程序能直接运行在asp.net 2.0上吗?
在sdk文档中,对于.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 will run on version 1.1 and applications using version 1.1 will run on version 2.0.”。 【相关文章:使用ASP.NET 2.0中的GridV】 【扩展阅读:ASP.NET虚拟主机安全漏洞解决方案】 看了这样的描述,我想:如果asp.net 1.1开发的程序真能直接运行在asp.net 2.0上,那就太棒了,但asp.net 2.0相对于1.1的变化这么大,做到这样的兼容难度很大,微软一向对向后兼容很重视,我们应该有所期望。如果兼容性不理想,从asp.net 1.1 迁移到asp.net 2.0会带来很大的成本与风险。自己开发的程序可以在asp.net 2.0上重新编译,可程序中所用的第三方组件呢? 【扩展信息:ASP.NET四种页面导航方式的比较与选】 那我们拿博客园的程序做个试验吧。对程序不作任何修改,直接在iis管理器中将asp.net切换至2.0, 并将*.*的映射改为asp.net 2.0。 程序安装在本机的blog虚拟目录中,首先我访问地址:http://localhost/blog(由于建立了通配符映射,iis不会把地址改为http://localhost/blog/default.htmlx), 出现第一个错误: there is no build provider registered for the extension . you can register one in the <compilation><buildproviders> section in machine.config or web.config. make sure is has a buildproviderappliestoattribute attribute which includes the value web or all. 在asp.net 1.1中,这样访问是正常的,由于建立了通配符映射,请求由web.config中 <add verb="*" path="*" type="dottext.common.urlmanager.urlrewritehandlerfactory,dottext.common" />处理。... 下一页