c# - Obtain Network Credentials from Current User in Windows Authentication Application -


I was wondering if it is possible to obtain current user objects and get their credentials so that I pass them together I can use the network credentials object which I use in my x I'm connecting to the Net Business Connector. As such, at the moment I have to specify that it connects as a specific user, which I set when I turn on the NetworkCredential object:

Private Network Credentials NC = New Network Credentials ("MyUser", "myPassword", "myDomain");

I was hoping to do this: Private Network Credential NC = (Network Credential) HttpContext.User; But obviously this will not work ...

In this way, it is easy to track which user has made a sales order for example, as specified by the user at this time I have specified all the things.

?

The default network credentials returned by the credentials represents the authentication credentials for the current security context in which the application is running. For client-side applications, these are usually Windows credentials (user names, passwords and domains) of the user running the application.

Comments