Sunday, 15 August 2010

c# - How to get a list of the connected vault workgroup users -


I have searched for all and I can not find the answer I needed. So all help is appreciated.

In the Volt workgroup from Autodesk, there are divided licenses on users who use the Walt workgroup. But when all licenses are used, it is difficult to know which is still logged in, it does not use the safe in that moment.

Then to solve this problem I got a code that shows a program that gives me a list of connected users yet to show me all the users from the Voltage workgroup, but This information is useless because I have all user accounts. I just need the currently connected users

I have found the code so far:

  public partial class MainWindow:. Window {Public MainWindow () {InitializeComponent (); } Private Zero PrintUsers (Object Sender, RoutedEventArgs e) {MyVault.AdminSample.PrintUserInfo (); }} Class MyVaultServiceManager: System.IDisposable {// We will implement WebServiceManager here. // WebServiceManager will be used for our Vault server calls Private WebServicesNapper _svcManager = null; {WebmasterGenerator Services {Receive} {return _svcManager; }} Public Enum mode {readOnly, ReadWrite}; // Preventing the use of the default constructor - made it Private Private MyValtsmanManager () {} // Constructor. // Parameters: - Login to read only, which does not consume / use a license // ========================= ======================================== Public MyVaultServiceManager (Mode i_ReadWriteMode) {Login for UserPasswordCredentials = New UserPasswordCredentials ("Local Host", "Walt", "Admin", "", (i_ReadWriteMode == Mode.ReadOnly)); // Yes, we must not hardcode the credentials here, // but this is just a sample _ s vcmnager = new webserver manager (login); } Zero system IDisposable.Dispose () {_svcManager.Dispose (); }} Category AdminSample {// All users are listed with their roles and vaults in which // has access // //===================== ========================================== public static void PrintUserInfo (try {try} Using {{MyVaultServiceManager MGR} = New MyVaultServiceManager (MyVaultServiceManager.Mode.ReadOnly)) // GetAllUsers method provides all users Info // ------------------ ----------------------------- -------------------------------------------------------------------- [User] = MGR.Services AdminServices.getAllwers (); TextWriter tmp = console.aut; Flamestream filestream = new filestream ("vault_ours.txt", fliemmod.creative); Var Streamline = New Streamer (Filmstream); Streamwriter.AutoFlush = true; Console.SetOut (StreamWriter); Forrest (user user in user) {User Infoda user Inc. = MGR Services. Admin service. GetUseer InfoBUUSIR ID (user.id); Console.WriteLine (user.Name); If (userInfo.Roles! = Null & amp; User Info.Roles.Length & gt; 0) {Console.WriteLine ("roles:"); Novel (role role in userInfo.Roles) {Console.WriteLine ("id:" + role.Id + "| Name:" + role.Name); }} If (userInfo.Vaults = Null & amp; userInfo.Vaults.Length & gt; 0!) {Console.WriteLine ("Vaults:"); Foreign Language (Knowledge Vilto Walt In User Info.) {Console. Videoline ("id:" + vault.Id + "| Name:" + vault.Name); }} Console. "Line" (""); } Console .SetAut (TMP); Streamwriter.Close (); Filestream.Close (); MessageBox.Show ("complete!", "Complete!"); } // use} hold (System.Exception e) {MessageBox.Show (e.Message); }} // printUserInfo ()}  

This time there is no way to do this is not. But there are programs that read AVFSlog files from the server, and filter the connected users.


No comments:

Post a Comment