c# - HttpClient does not see "Set-Cookie" header -
i have mvc login form: [httppost] public actionresult login(loginviewmodel viewmodel) { if (viewmodel.username == "alex" && viewmodel.password == "password") { formsauthentication.setauthcookie(viewmodel.username, false); return redirecttoaction("index", "home"); } return view(); } and console app client consumes mvc login action: private static void getperson() { console.writeline("username:"); string username = console.readline(); console.writeline("password:"); string password = console.readline(); using (httpclient httpclient = new httpclient()) { httprequestmessage authrequest = new httprequestmessage(); authrequest.method = httpmethod.post; authrequest.requesturi = new uri(@"http://localhost:4391/account/login"); authrequest....