Obtain Network Credentials from Current User in Windows Authentication Application

后端 未结 2 1308
终归单人心
终归单人心 2021-02-05 12:32

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

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 13:31

    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.

提交回复
热议问题