c# - PostAsync does not add cookies -


i have website using web security , web system built in asp.net identity, both applications having same credentials of user, requirement when sign in in web security application through redirects or something, can logged other website using credentials user provide.

i have tried redirecting , putting login credentials in control , triggering submit not working.

//here code redirecting external url response.redirect("http://localhost:2534/account/logon?username=" + m.username + "&password=" + m.password, false); 

next thing tried call logon post method directly website , still not working

private static readonly httpclient client = new httpclient(); var values = new dictionary<string, string> {     { "username",  "username"},     { "password", "password" },     { "rememberme", "true" } };  var content = new formurlencodedcontent(values); var response = await client.postasync(http://localhost:2534/account/logon", content); var responsestring = await response.content.readasstringasync(); 


Comments

Popular posts from this blog

python - RuntimeError: can't re-enter readline -

python - PyInstaller UAC not working in onefile mode -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -