I'm having problems using Response.redirect in conjunction with Microsoft Proxy Server. The redirect works well for some users, but not for others. How can I fix this problem?
A problem exists with using Response.redirect with a Post command (usually when submitting a form), but that doesn't sound like your problem. (See the Microsoft article "FIX: IE Error When Posting to an ASP that Initiates Redirects" at http://support.microsoft
.com/support/kb/articles/q175/3/18
.asp for information about this problem.) As it turns out, Microsoft Internet Explorer (IE) 5.0, 4.01 with SP1, 4.01, and 4.0 all have problems with Response.redirect when Proxy Server or a Web server returns them under certain conditions (e.g., if the redirect instruction is in one frame and the new redirect destination page is in another). Patches are available to fix the problem in these IE versions; Microsoft resolved the problem in IE 5.01.
Usually, when a redirect occurs, the server sends error 302 Object moved to the browser. If you can cause the browser to go to a new URL without the server sending it error 302 Object moved, you might solve the problem without applying any patches. So, try creating your own redirect function. Instead of using Response.redirect, use your own routine. You need to send the browser this code:
Response.Status = "302 Found"
Response.AddHeader "Location", YourURLHere
Response.AddHeader "Connection", "close"
I've read, but not tested, that to solve the Object Model problem, you might be able to procede the redirect with a Response.clear statement, such as
<%
Response.clear
Response.redirect <http://the
-new-server.com>
%>
See the Microsoft article "Internet Explorer Returns Error Message When Being Redirected" (http://support
.microsoft.com/support/kb/articles/
q193/4/89.asp) for information about this problem. (Thanks to reader Shane Pike for this question.)
I saw a study stating that IIS performance can decrease as you add CPUs. I've also heard that Microsoft didn't design IIS for multiprocessor systems and it doesn't benefit from more than two CPUs. Can you help clarify the circumstances in which adding processors helps or hurts IIS?
Although adding more processors can decrease performance, this decrease occurs only when you add processors that you don't need. In such cases, you spend more time managing the additional complexity of the multi-CPU system than benefiting. I wouldn't go so far as to say that Microsoft didn't design IIS for multiprocessor machinesIIS is a Windows NT service, and NT makes good use of multiple CPUs. Win2K has evidently improved on this ability as well.
In addition, IIS can benefit from system use of multiple processors in ways that aren't necessarily directly related to IIS. For example, the network device interface specification (NDIS) assigns a NIC to each CPU by default. Spreading the network support load among the processors results in more efficient use of processor time to manage network activity, which in turn benefits IIS performance.
If you want to use multiple CPUs and IIS, be sure you're using SP5 or later because in SP5, Microsoft fixed a multiple-processor bug that caused ASP to crash. For a quick look at your processor load, use Performance Monitor to determine your typical load on these indicators:
- System: Processor Queue LengthThis indicator is the number of instructions waiting (queued) to be executed. The number shouldn't exceed 2 for a sustained period of time.
- System: % Total Processor TimeThis counter gives the percentage of time a processor is in use. On a multi-CPU system, this percentage is the sum of time in use for all processors divided by the number of processors. In other words, if one processor is running at 100 percent and another at 0, this counter will show 50 percent.
- Processor: % Processor TimeThis indicator monitors the same statistic as % Total Processor Time, but for individual processors. The counter also shows uneven distribution of the CPU load. In a single-CPU system, this number is always the same as % Total Processor Time.
- Processor: % Privileged TimeThis counter shows the percentage of time spent in Privileged mode. The NT core functions operate in this mode. High numbers here often mean that the OS is working hard to manage system functions.
- Processor: % User TimeThis counter indicates the percentage of time spent in User mode. IIS services (e.g., Inetinfo) run here.
- High processor use with low to moderate network use can indicate a processor bottleneck. Also keep in mind that excessive paging, which occurs when the system is low on RAM, can masquerade as high CPU usage. Be sure you have sufficient RAM available for your system before concluding that your CPUs are a bottleneck. For more information about using Performance Monitor and tuning IIS, see
- The Microsoft Internet Information Server Resource Kit, Chapter 4
- IIS 5.0 Resource Guide, Chapter 5 (The resource guide is part of the Windows 2000 Resource Guide.)
- The Microsoft article "The Art and Science of Web Server Tuning with Internet Information Services 5.0" (http://www.microsoft.com/technet/
iis/iis5tune.asp)
- The Microsoft article "Internet Information Server 4.0 Tuning Parameters for High-Volume Sites" (http://www
.microsoft.com/technet/iis/technote/
iistun.asp)
- The Microsoft article "Measuring Hardware Performance of Web Sites" (http://www.microsoft.com/technet/
iis/meashd.asp)
- Ken Spencer's Windows NT Magazine article "Optimizing IIS for Peak Performance" (May 1998)
1)I am surfing snowboard.com, our website that is having problems and the pages seem to be serving quickly.
2)When I click on a link to get a new page, I receive microsofts dns error page.
3)I ping the www.snowboard.com and it works fine. So this must mean that the dns request is resolving correctly. I try to connect to snowboard.com through port 80 using telnet and get connection refused.
4)I try connecting to other sites that we host and they are fine.
5)Eventually after refreshing the page a bunch of times, sometimes I have to wait up to 5 minutes, the website will serve the page I requested. No Sesseions are lost during this time but it seems like no additional connections can be made.
It almost seems like port 80 is being closed for some reason and then opens again.
Have you ever seen a problem like this before? Is it a problem with iis or a networking problem? Please help as we have been stumped on this for months.
Adam Arsenault December 04, 2001