I'm trying to log in to my web site and get the session cookie but I don't find a way to get it.
I'm using the WebClient class, but I'm open to any other class that could work!
WebClient client = new WebClient();
NameValueCollection values = new NameValueCollection
{ ["username"] = "user", ["password"] = "pwd"};
byte[] response = client.UploadValues(url, values);
string requestResponse = Encoding.Default.GetString(response);
Any help would be appreciated.