views:

373

answers:

2

I have a very strange behavior with Request.Form.

Here are two IIS 7 servers running the same ASP.NET application. On the first instance it's all ok. But the second one have very slow performance.

Profiler showed that this line:

context.Request.Form["id"]

takes more than 130 ms each time!

Profiler log:

0,60% get_Form - 4536 ms - 68 calls - System.Web.HttpRequest.get_Form()

Server configurations are just the same (?). The first server runs Vista, the second (slower) runs Windows Web Server 2008.

UPD: Both application instances are running in integrated mode, pool setting are the same.

Any ideas?

A: 

Is Request.Form["id"] your only reference to Request.Form during this request? In this case, the time may be related to the overhead of referring to the Form collection. For fun, try adding another reference to Request.Form to see if it also takes 130ms.

John Saunders
It was a mistake: single Request.Form["id"] takes about 60-65 ms.If there are 2 references to Request.Form it takes 2 x 65 ms = 130 ms.
alexey
A: 

Fixed! Just changed the application port from 80 to 8080. I don't know the reasons of this behavior.

alexey