I was wondering whether it was possible to obtain the current user object and get their credentials so that I can pass them along to a NetworkCredential
object whic
I don't fully understand your question, but is your call coming from ASP.NET that you require the credentials? You could attempt:
Uri uri = new Uri("http://tempuri.org/");
ICredentials credentials = CredentialCache.DefaultCredentials;
NetworkCredential credential = credentials.GetCredential(uri, "Basic");
Assuming your user has already authenticated via a Membership Provider.
CredentialCache.DefaultNetworkCredentials?
The credentials returned by
DefaultNetworkCredentials
represents the authentication credentials for the current security context in which the application is running. For a client-side application, these are usually the Windows credentials (user name, password, and domain) of the user running the application.