简体   繁体   English

IIS7无法加载aspx页面

[英]IIS7 fails to load aspx pages

I've been trying to migrate a fairly large web application from IIS6 to IIS7 the past few days, but every time it seems like we're about done, IIS7 fails to load aspx pages. 过去几天,我一直在尝试将相当大的Web应用程序从IIS6迁移到IIS7,但是每次似乎即将完成时,IIS7都无法加载aspx页面。

The application is a .net 3.5 webapp that makes heavy use of reflection and web services. 该应用程序是一个.net 3.5 Webapp,它大量使用了反射和Web服务。 We use 2 main components (each with their own web site in IIS7 although they share an application pool): the web UI (aspx pages), and the webAPI (asmx pages). 我们使用2个主要组件(尽管它们共享一个应用程序池,但每个组件都在IIS7中拥有自己的网站):Web UI(aspx页面)和webAPI(asmx页面)。

The webAPI portion runs perfectly (as far as we can tell; there are a few things we can't test from the browser), and the web UI pages load static HTM pages just fine. webAPI部分运行完美(据我们所知;有些事情我们无法通过浏览器进行测试),并且Web UI页面可以很好地加载静态HTM页面。 The problem is that once we attempt to view an aspx page (any aspx page), the whole thing just comes to a halt; 问题在于,一旦我们尝试查看一个aspx页面(任何aspx页面),整个过程就会停止; no error is logged in the event viewer until a few minutes later when we get an IIS 5010 warning (worker process ignoring ping). 几分钟后,当我们收到IIS 5010警告(工作进程忽略ping)时,事件查看器中才会记录错误。

We've attempted to migrate the app in two different ways: 我们尝试以两种不同的方式迁移应用程序:

  1. Manually: we moved all the necessary files and set up the virtual directories then converted them to Web Sites. 手动:我们移动了所有必需的文件并设置了虚拟目录,然后将它们转换为网站。 Result: the worker process took up 100% of a single core and spun forever (until terminated manually) 结果:工作进程占用了单个内核的100%,并永久旋转(直到手动终止)
  2. Automatically: Utilizing the MSDeploy application from www.iis.net we archived the entire IIS6 web server and unpacked it into a blank IIS7 install. 自动:利用www.iis.net上的MSDeploy应用程序,我们存档了整个IIS6 Web服务器,并将其解压缩为空白的IIS7安装。 We had to turn off Forms Auth to get rid of a 401.2 error, but after that the result here was that the webAPI component still works just fine, but instead of the web UI worker process taking up 100% of a single core, it grew to about a third of the required memory then hung out doing nothing. 我们必须关闭Forms Auth才能消除401.2错误,但此后的结果是webAPI组件仍然可以正常工作,但是它代替了Web UI worker进程占用了单个核心的100%到所需内存的大约三分之一,然后闲着无所事事。

Either way, what happened from the user's point of view was the same. 无论哪种方式,从用户的角度来看都是一样的。

Unfortunately, we can't even attach a debugger to the worker process because it doesn't seem to be loading managed code. 不幸的是,我们甚至无法将调试器附加到工作进程中,因为它似乎并未加载托管代码。

Details: 细节:

  • .net framework: v3.5 .net框架:v3.5
  • CLR version: v2.0 CLR版本:v2.0
  • IIS Authorization mode: Anonymous IIS授权模式:匿名
  • OS arch: x64 操作系统架构:x64
  • App arch: x86 应用架构:x86
  • Happens with both classic and integrated pipelines 发生在经典管道和集成管道中

Notes: 笔记:

  • New web projects seem to work just fine in IIS7 and, of course, xml web services are also fine 新的Web项目在IIS7中似乎可以正常工作,当然,xml Web服务也可以
  • temporary DLLs are created and stored in the temporary ASP.net DLLs folder, even though the worker process never seems to contain managed code. 临时DLL 创建并存储在临时ASP.net的DLL文件夹,即使工作进程似乎永远不会包含托管代码。
  • New pages added to the web UI project also show the same behavior (Didn't hurt to try) 添加到Web UI项目的新页面也显示相同的行为(尝试时不会感到受伤)

Updates: 更新:

  • We've narrowed down the problem to a single assembly. 我们已将问题缩小为单个程序集。 It's a wrapper for a third party web control. 它是第三方Web控件的包装。 I'm looking into replacing it, we'll see if it fixes the problem. 我正在研究替换它,我们将看看它是否可以解决问题。

http://support.softartisans.com/kbview.aspx?ID=1318 http://support.softartisans.com/kbview.aspx?ID=1318

Turns out it was an issue with the vendor control. 原来这是供应商控件的问题。 Wish their solution actually worked though... 希望他们的解决方案确实有效...

Try to re-register ASP.NET: 尝试重新注册ASP.NET:

http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx

The typical command line syntax would be to command line to the ASP.NET 2.0 version of your framework and type: 典型的命令行语法是将命令行输入到框架的ASP.NET 2.0版本并键入:

aspnet_regiis -i

Are you using the "Classic" Pipeline Mode for your Application Pool. 您是否在应用程序池中使用“经典”管道模式。 The "Integrated" one is the default in IIS7 and it introduced changes in terms of configuration. 在IIS7中,“集成”是默认设置,它在配置方面进行了更改。 (One example is HttpHandlers that need a different configuration in web.config). (一个示例是需要在web.config中进行其他配置的HttpHandlers)。

The "Classic" one mimics the IIS6 application pool, and should work with the same configuration as for IIS6. “经典”类模仿IIS6应用程序池,并且应使用与IIS6相同的配置。

If you prefer to use the Integrated Pipeline, there are some tools that will automatically try to convert you configuration files. 如果您更喜欢使用集成管道,则有些工具会自动尝试转换您的配置文件。

Scott Hanselman covers some of these tools in his blog post . Scott Hanselman在他的博客文章中介绍了其中一些工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM