I'm doing a web request that is too slow. It takes around 3.2 seconds to GetResponseStream() and .8 seconds to ReadToEnd()
If I run the same request in a web browser I get a response in less than a second... I'm wondering what I can do to speed up the request and what might cause it to be slow?
Based on other questions I saw here, I disabled the proxy in app.config + enabled max connections, just in case (it's still slow). The section I added was:
<system.net>
<defaultProxy enabled="false">
<proxy/>
<bypasslist/>
<module/>
</defaultProxy>
<connectionManagement>
<add address="*" maxconnection="65000" />
</connectionManagement>
Here's a screenshot of what the code looks like and what is slow:
I'd appreciate any help... 4-8 seconds is way too long for a user to wait for an ajax request to complete.
Thanks!