Jump to content
Tuts 4 You

Make http connection accessible in server busy mode


Bufon

Recommended Posts

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 HEADER

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://somesite.com/Appointment.jsp
Cookie: x-bni-ca=2057692237; JSESSIONID=E52C0DEE598BBABAAC74736A09F553B8.bgd-5
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 82

RESPONSE HEADER

HTTP/1.1 302 Moved Temporarily
Date: Fri, 31 Jul 2015 06:46:46 GMT
Cache-control: no-cache,no-store
Pragma: no-cache
Expires: -1
Location: http://somesite.com/applicationid.jsp?errormsg=generated application id is B798A0
Content-Length: 0
Keep-Alive: timeout=5, max=75
Connection: Keep-Alive
Content-Type: text/html;charset=ISO-8859-1

Edited by Bufon
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...