Richie

Sometimes at night when I look up at the stars, and see the whole sky just laid out there, don't you think I ain't remembering it all. I still got dreams like anybody else, and ever so often, I am thinking about how things might of been. And then, all of a sudden, I'm forty, fifty, sixty years old, you know?

ASP.NET 2.0的站点上部署1.1的虚拟目录

Application Pool分开是基本前提,另外的麻烦是web.config文件冲突

ASP.NET的web.config具有继承机制,站点使用2.0而虚拟目录使用1.1时仍然这样处理,所以虚拟目录1.1的应用程序启动时会报错误,无法处理站点2.0的web.config文件,例如connectionString节点等

解决方法:

修改C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config文件,例如解决1.1虚拟目录无法处理connectionString节点,则在machine.config的configSections中添加下面节点,让1.1的应用忽略connectionString这个节点:

<section name="connectionStrings"

    type="System.Configuration.IgnoreSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

    allowLocation="false" />

 对于其它属性,则只能删除(例如xmlns属性等),或者采用1.1、2.0都能统一处理的格式(例如pages的pageBaseType属性值等)

posted on 2008-08-07 22:02  riccc  阅读(559)  评论(0编辑  收藏  举报

导航