• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

When the IIS Service Gets Unavailable(from DDJ)

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 25次 | 进入软件测试论坛讨论

领测软件测试网

ASP.NET 1.x and ASP.NET 2.0 apps don’t play nice in the same pool

After installing any build of ASP.NET 2.0, you may have experienced an apparently inexplicable IIS 6.0 runtime error when trying to run or debug an ASP.NET application. The error has nothing to do with any line of code written in your app. For some reason, IIS doesn抰 even attempt to run the application, and the error message invites you to verify the correct functioning of the web server. What provokes this runtime anomaly? If you take a look at the Application section in the Event Viewer, you find concrete information on how to fix the issue and what caused it. But let抯 start with some background information about the context.

The erroneous situation can be easily reproduced on Windows 2003 Server machines with the Beta 1 of ASP.NET (same with any pre-Beta 1 builds and reasonably with future builds as well). Once you install ASP.NET 2.0 on a machine where a version of ASP.NET 1.x was previously installed, you get two different versions of the ASP.NET runtime running side by side. There抯 nothing wrong with this, except that the two runtime engines are made to conflict in the IIS 6.0 memory space. Only this conflict is at the origin of the anomaly and raises the exception.

By default, ASP.NET 2.0 registers its own script maps for all applications, including new applications. From now on, any application runs under ASP.NET 2.0 and any newly created application is registered to use ASP.NET 2.0 binaries. By using offline tools like as.net_regiis or the ASP.NET 2.0 MMC snap-in, you can modify the binaries required to run a given application. Now suppose you open Visual Studio .NET to create a new ASP.NET application. Visual Studio .NET creates the IIS virtual folder for it, and in doing so, it binds the application to ASP.NET 2.0. What you want instead is just an ASP.NET 1.x application. So when using either the MMC snap-in or aspnet_regiis, you change the set of binaries and ensure that your app uses those of ASP.NET 1.x.

If you run Windows 2000 and IIS 5.x, there are no significant issues; if you use Windows 2003 Server and IIS 6.0, you must guarantee that each IIS 6.0 Application Pool is populated with homogeneous applications. In other words, it is not possible to run two different versions of ASP.NET in the same IIS Application Pool. What抯 an Application Pool? Basically, it is a pool of IIS applications that share the same copy of the IIS worker process (w3wp.exe). If you happen to have 2.0 and 1.x applications in the same pool, IIS can hardly figure out which binaries to use and blocks the execution making the WWW service unavailable. You use the IIS Administration Tool to reconfigure the application to run in a separate pool. By default, any new application goes into the standard pool named 揇efaultAppPool,?thus increasing the chances of raising version conflicts.

The 揝ervice Unavailable?error may occur when you run different versions of ASP.NET in the same IIS Application Pool. To fix the problem, you just move applications in different pools. A good approach is leaving, at a minimum, DefaultAppPool hosting ASP.NET 2.0 applications, and creating a second pool for all version 1.x applications. You can also resort to a more fine-grained subdivision as long as you keep 2.0 and 1.x applications separate in IIS 6.0.


延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网