IIS7 - 一次只提供一页.这让我疯狂! [英] IIS7 - only serves up one page at a time. It's a making me crAzY!

查看:25
本文介绍了IIS7 - 一次只提供一页.这让我疯狂!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况:经典 ASP 应用程序,使用自定义应用程序池.默认设置.

Situation: Classic ASP application, using a custom Application Pool. Default settings.

某些 IIS7 机器上,IIS 决定一次只提供一个页面.因此,如果多个页面从一个站点加载任何页面,则每个页面都必须连续加载.

On some IIS7 machines, IIS decides to serve only one page at a time. So if multiple load any pages from a site, each one has to load in succession.

例如如果我从一个浏览器和另一台机器加载 http://foo.com/default.asp加载 http://foo.com/differenturl.asp,第一个必须完成,另一个才会加载.这几乎就像 w3p 进程是单线程的.

e.g. If I load http://foo.com/default.asp from one browser, and from another machine I load http://foo.com/differenturl.asp, the first has to finish before the other will load. It's almost like the w3p process is single threaded.

请注意,IIS 的高级设置中有一个名为 MaxProcesses 的设置,上面写着将此设置为大于 1 以创建 Web 花园"(无论是什么).这并不能解决问题,因为这会产生具有自己的会话状态等的多个进程,并且当您加载 http://foo.com/default.asp 无法保证您被分配到相同的进程.

Note, there is a setting called MaxProcesses in the Advanced Settings for IIS that says "Set this to greater than 1 to create a Web Garden" (whatever that is). This does NOT solve the problem because this spawns multiple processes with their own session state etc, and when you load http://foo.com/default.asp there's no way to guarantee you get assigned to the same process.

问题暴露出来是因为我们有一个用 ASP 编写的诊断页面,它创建了一个 ActiveX 控件,它在网站上加载一个 url 并返回结果.

The problem revealed itself because we have a diagnostic page which is written in ASP that creates and ActiveX control which loads a url on the website and returns the results.

因此,diagnostics.asp 加载并在服务器端的代码中创建一个小型 Web 控件,该控件在同一台服务器上加载(想想 XMLHTTP 控件)default.asp.

So, diagnostics.asp loads and in the code on the server side it creates a small web control that loads (think XMLHTTP control) default.asp on the same server.

此页面永远不会完成加载,因为服务器在为 default.asp 页面提供服务之前正在等待诊断.asp 页面完成.死锁!

This page will NEVER finish loading, because the server is waiting for the diagnostics.asp page to finish before it serves the default.asp page. Deadlock!

这在每台 IIS6 机器上都能正常工作,我相信有一些 IIS7 服务器也能正常工作.

This works fine on every IIS6 machine out there, and I believe there are some IIS7 servers where it works fine too.

我已经确认这也不是我们古怪的诊断结果.从一台机器或什至不同的机器加载多个选项卡将显示 Web 进程一次处理一个.

I've verified it's not a result of our quirky diagnostic either. Loading multiple tabs from one machine, or even separate machines will show that the web process handles them one at a time.

正确答案 by AnthonyWJones:在 IIS7 中打开了服务器端调试.这会将 IIS 置于单线程模式.

Correct Answer by AnthonyWJones: Server Side debugging was turned on in IIS7. This puts IIS into single threaded mode.

推荐答案

在 IIS 管理器中单击树中的应用程序.

In IIS manager click on the application in the tree.

双击 IIS 部分下的 ASP.

Double click ASP under the IIS section.

展开调试属性"

确保启用客户端调试"和启用服务器端调试"都设置为 false.

Ensure both "Enable Client-side Debugging" and "Enable Server-side debugging" are set to false.

启用调试后,ASP 仅限于以单线程方式一次处理一个请求.

When debugging is enabled ASP is limited to processing one request at a time in a single threaded manner.

这篇关于IIS7 - 一次只提供一页.这让我疯狂!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆