C# HttpWebRequest website sign in

后端 未结 2 1680
忘了有多久
忘了有多久 2021-01-14 08:27

I am trying to switch from a web browser control to http requests for automating tasks for speed. With this function I can post data and receive a logged in page, but no coo

2条回答
  •  感动是毒
    2021-01-14 08:37

    This post seems to have an answer with positive vote count: C# keep session id over httpwebrequest

    Create a CookieContainer instance in your first request to the server, and instead of creating a new one for your next request, re-use that instance.

提交回复
热议问题