Beispiel #1
0
 protected override void AuthorizeServer()
 {
     ServerAuthorization.AuthorizeServer(UdpServerEntryPoint.PortNumber,
                                         ServerConfigurationManager.Configuration.HttpServerPortNumber,
                                         ServerConfigurationManager.Configuration.HttpsPortNumber,
                                         MainStartup.ApplicationPath,
                                         ConfigurationManager.CommonApplicationPaths.TempDirectory);
 }
Beispiel #2
0
        /// <summary>
        /// Registers the server with administrator access.
        /// </summary>
        private void RegisterServerWithAdministratorAccess()
        {
            Logger.Info("Requesting administrative access to authorize http server");

            try
            {
                ServerAuthorization.AuthorizeServer(ServerConfigurationManager.Configuration.HttpServerPortNumber,
                                                    HttpServerUrlPrefix, ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber,
                                                    UdpServerEntryPoint.PortNumber,
                                                    ConfigurationManager.CommonApplicationPaths.TempDirectory);
            }
            catch (Exception ex)
            {
                Logger.ErrorException("Error authorizing server", ex);
            }
        }