Q. When a Web browser or ASP.NET application connects to a IIS 6.0 server, or downloads a file, you receive an error message?

Jerold Schulman

July 25, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

When you use a Web browser or an ASP.NET application to connect to an IIS 6.0 server, you receive any of the following errors:

The underlying connection was closed. An unexpected error occurred on a receive.System.Net.WebException: The underlying connection was closed.Exception Type: System.Net.Sockets.SocketException NativeErrorCode: 10054 Message: An existing connection was forcibly closed by the remote host.

This behavior may also occur when you download a very large file from a client with a slow connection.

Check the HttperrX.log file on the IIS 6.0 server for a line containing Timer_MinBytesPerSecond. If you find it, this behavior occurs because of an error in the Http.sys file, which may be fixed by applying the latest service pack.

If this problem continues, the network connection may be too slow. Use a network trace to determine whether there is delay in receiving the response and packet retransmissions.

To workaround this behavior, reduce or disable the MinFileBytesPerSec property in IIS 6.0 to prevent a slow client connection from being closed too early:

1. Open a CMD.EXE window on the IIS 6.0 server.

2. Type the following command and press Enter:

cscript //nologo C:InetpubAdminScriptsadsutil.vbs get w3svc/MinFileBytesPerSec

You should receive a line similar to MinFileBytesPerSec       : (INTEGER) 240 which shows the current MinFileBytesPerSec value.

3. To change the MinFileBytesPerSec property to 50 bytes per second, type:

cscript //nologo C:InetpubAdminScriptsadsutil.vbs set w3svc/MinFileBytesPerSec 50

4. To disable the MinFileBytesPerSec property, type:

cscript //nologo C:InetpubAdminScriptsadsutil.vbs set w3svc/MinFileBytesPerSec 0


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like