locked
http post to server using webClient same as browser RRS feed

  • Question

  • I am posting to website using webclient in c#. I have some question in my mind which makes me confusing. my site is java based site and has login page. i am new to c# want to know these things.

     1.
     **How can i appears to the server that I am a web browser.**

     2. **Do i need to worry about only session cookie or other header also.
    which header is needed from below for concurrent post.**

    **Accept**: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

    **Accept-Encoding**: gzip,deflate

    **User-Agent**: Mozilla/5.0 (Windows T 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36

    **Referer**: https://www.aa.co.in/aa/index


    Friday, August 12, 2016 1:00 PM

Answers

  • Hi MrinalKumarJha,

    Thank you for posting here.

    For your question, what is it related to? Could you provide more details?

    If it is related to ASP.NET. You could post a new thread in ASP.NET form.

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Thanks for your understanding.

    Best Regards,

    Hart


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Friday, August 19, 2016 8:19 AM
    • Marked as answer by DotNet Wang Wednesday, August 24, 2016 1:56 AM
    Monday, August 15, 2016 8:32 AM