Exemple #1
0
        private void LoadIis()
        {
            // TODO: load if only on Windows.
            var config = Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder.System),
                "inetsrv",
                "config",
                "applicationhost.config");

            if (File.Exists(config))
            {
                var data = ServerTreeNode.CreateIisNode(
                    _serviceContainer,
                    Environment.MachineName,
                    config);
                RegisterServer(data);
            }
        }
Exemple #2
0
        private void LoadIis()
        {
            if (!PublicNativeMethods.IsProcessElevated)
            {
                // IMPORTANT: only elevated can manipulate IIS.
                return;
            }

            // TODO: load if only on Windows.
            var config = Path.Combine(
                Environment.GetFolderPath(Environment.SpecialFolder.System),
                "inetsrv",
                "config",
                "applicationhost.config");

            if (File.Exists(config))
            {
                var data = ServerTreeNode.CreateIisNode(
                    _serviceContainer,
                    Environment.MachineName,
                    config);
                RegisterServer(data);
            }
        }