Ejemplo n.º 1
0
 public static void FirstInit()
 {
     if (Inited == true)
     {
         return;
     }
     {
         var Auth0 = CLUNL.Utilities.RandomTool.GetRandomString(32, CLUNL.Utilities.RandomStringRange.R3);
         var Auth1 = CLUNL.Utilities.RandomTool.GetRandomString(32, CLUNL.Utilities.RandomStringRange.R3);
         TrustedInstallerAuth = OperatorAuthentication.ObtainRTAuth(Auth0, Auth1);
         Auth0        = CLUNL.Utilities.RandomTool.GetRandomString(32, CLUNL.Utilities.RandomStringRange.R3);
         Auth1        = CLUNL.Utilities.RandomTool.GetRandomString(32, CLUNL.Utilities.RandomStringRange.R3);
         PipelineAuth = OperatorAuthentication.ObtainRTAuth(Auth0, Auth1);
         OperatorAuthentication.SetTrustedInstaller(TrustedInstallerAuth);
         OperatorAuthentication.SetPipelineAuth(PipelineAuth, TrustedInstallerAuth);
         GlobalConfiguration.SetTrustedInstallerAuth(TrustedInstallerAuth);
         DomainManager.SetTrustedInstaller(TrustedInstallerAuth);
         RSServer.SetFunctions(Tools00.ResolveCommand, ServerController.Control, TrustedInstallerAuth);
     }
     {
         //Init MIME-Types
         try
         {
             var count  = GlobalConfiguration.GetValue("MIMETYPE.COUNT", TrustedInstallerAuth, "0");
             var _count = int.Parse(count);
             for (int i = 0; i < _count; i++)
             {
                 var m = GlobalConfiguration.GetValue("MIMETYPE." + i, TrustedInstallerAuth, null);
                 if (m is not null)
                 {
                     var d = m.Split(';');
                     Tools00.SetMimeType(new(d[0], d[1]), TrustedInstallerAuth);
                 }
             }
         }
         catch (Exception)
         {
         }
     }
     ServerVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString() + "-Preview";
     Inited        = true;
 }