I want to create a NetworkCredential based on the logged in user like:
var cred = new NetworkCredential("username", "password", "domain");
Usually the code is running on a system which the user is logged in using his/her password. So I don't want to get the password again. My question has 2 parts:
Question 1. Is there a way to get the current Credential for Desktop applications? Something like:
var cred = NetworkCredential.Current;
Question 2. In a web SPA application, how can I pass the credential to the server via WebApi so I can do the work using his/her credential?