public static string LogonUsingWindows(String username)
        {
            UserIdentity2 currentUserIdentity = new UserIdentity2();

            currentUserIdentity.UserId        = username;
            currentUserIdentity.LogOnProtocol = 7;

            var usrSession = usrSvc.GetSingleSignOnSessionAsync(StaticClass.Configuration["KTASetting:KTA_SYSTEM_SESSION"], currentUserIdentity).GetAwaiter().GetResult();

            return(usrSession.SessionId);
        }
Exemple #2
0
        public async Task <string> LogonUsingWindowsAsync(String username)
        {
            var           usrSvc = new KTA_UserServices.UserServiceClient();
            UserIdentity2 currentUserIdentity = new UserIdentity2();

            currentUserIdentity.UserId        = username;
            currentUserIdentity.LogOnProtocol = 7;
            var usrSession = await usrSvc.GetSingleSignOnSessionAsync(_config.KTA_SYSTEM_SESSION, currentUserIdentity);

            await usrSvc.CloseAsync();

            return(usrSession.SessionId);
        }