I had a similar problem with the VB.Net MVC project.
Locally on my computer (Windows 7), it took less than 1 second to search for pages, but on the server (Windows Server 2008 R2) it took 20 seconds for each page request.
I tried a combination of setting proxy to null
System.Net.WebRequest.DefaultWebProxy = Nothing request.Proxy = System.Net.WebRequest.DefaultWebProxy
And changing the configuration file, adding
<system.net> ....... <connectionManagement> <add address="*" maxconnection="20"/> </connectionManagement> </system.net>
This still did not reduce the slow page request time on the server. In the end, the solution was to uncheck the "Automatically detect settings" checkbox in the IE settings on the server itself. (In the "Tools → Internet Options" section, select the "Connections" tab. Click the "LAN Settings" button)
Immediately after I unchecked this browser option on the server, all page request times fell from 20 + seconds to less than 1 second.
jamieb Jan 15 '13 at 16:26 2013-01-15 16:26
source share