I have an SDK script that creates new repository users, but when running 20 instances at the same time it gives the error: ([9030] The user account has reached its session limit).
I used a C # script declaring the Login but it gives the error.
protected override void Execute() { String LFusuario = this.GetTokenValue("Usuario").ToString(); String LFclave = this.GetTokenValue("Contrasena").ToString(); String LFserver = this.GetTokenValue("Server").ToString(); String LFrepositorio = this.GetTokenValue("Repositorio").ToString(); String userName = this.GetTokenValue("Socio").ToString(); String password = "123"; RepositoryRegistration myRepoReg = new RepositoryRegistration(LFserver, LFrepositorio); Session mySess = new Session(); mySess.LogIn(LFusuario, LFclave, myRepoReg); UserInfo UI = new UserInfo(); UI.Session = mySess; UI.Name = userName; UI.Password = password; UI.MustChangePassword = true; UI.FeatureRights = FeatureRights.Search; UI.ReadonlyAccess = true; UI.Save(); try { UI.Save(); } catch (Exception e) { } mySess.LogOut(); mySess.Close(); mySess.Discard(); }
I used a VB script using RASessions, but it gives the same error.
Protected Overrides Sub Execute() Try Dim ui As UserInfo = New UserInfo() ui.Session = RASession ui.IsDisabled = False ui.CanUsePassword = True ui.Name = GetTokenValue("Socio") ui.Password = ("123") ui.ReadonlyAccess = True ui.Save() Catch ex As Exception WorkflowApi .TrackError(ex.Message) End Try End Sub
Some way that Workflow Script does not stop for maximum number of LF Sessions with the same user?
Thanks