Bufon Posted August 3, 2015 Posted August 3, 2015 (edited) I want to access a site (3rd party, I have no server side access to it) via HttpClient in c#. All works well but without a fact. I want to access the site most at a certain time of the day, for 3-4 minutes. But this time the server flooded by user requests and server sends http response code 504.The time is almost fixed, that is when I want to get contents from it.And it gets inaccisible for that time due to loads of user hits.Is there any technique, (such as Keep-Alive header) that can maximize my chance to get response from that site when it even gets busy? I search a lot but found nothing. If you could help me, I would be grateful. Thanks guys.I'am Adding here normal time request and response header for your further understanding.... REQUEST HEADERUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: http://somesite.com/Appointment.jspCookie: x-bni-ca=2057692237; JSESSIONID=E52C0DEE598BBABAAC74736A09F553B8.bgd-5Connection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 82RESPONSE HEADERHTTP/1.1 302 Moved TemporarilyDate: Fri, 31 Jul 2015 06:46:46 GMTCache-control: no-cache,no-storePragma: no-cacheExpires: -1Location: http://somesite.com/applicationid.jsp?errormsg=generated application id is B798A0Content-Length: 0Keep-Alive: timeout=5, max=75Connection: Keep-AliveContent-Type: text/html;charset=ISO-8859-1 Edited August 3, 2015 by Bufon
amithacker Posted August 3, 2015 Posted August 3, 2015 (edited) ... Edited August 4, 2015 by amithacker
Bufon Posted August 3, 2015 Author Posted August 3, 2015 BTW, if you see me a demo I may get interest....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now