Esempio n. 1
0
        protected override void Initialize(object navigationData)
        {
            base.Initialize(navigationData);
            var service = (IConfigurationService)GetService(typeof(IConfigurationService));

            pictureBox1.Image = service.Scope.GetImage();

            var certificateFeature = new ClientCertificateAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(certificateFeature, this));

            var anonymousFeature = new AnonymousAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(anonymousFeature, this));

            if (service.Scope == ManagementScope.Server && PublicNativeMethods.IsProcessElevated)
            {
                // TODO: Elevation is needed to modify root web.config.
                var impersonationFeature = new ImpersonationFeature(Module);
                listView1.Items.Add(new AuthenticationListViewItem(impersonationFeature, this));
                impersonationFeature.Load();
            }

            var basicFeature = new BasicAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(basicFeature, this));

            var digestFeature = new DigestAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(digestFeature, this));

            if (service.Scope == ManagementScope.Server && PublicNativeMethods.IsProcessElevated)
            {
                // TODO: Elevation is needed to modify root web.config.
                var formsFeature = new FormsAuthenticationFeature(Module);
                listView1.Items.Add(new AuthenticationListViewItem(formsFeature, this));
                formsFeature.Load();
            }

            var windowsFeature = new WindowsAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(windowsFeature, this));

            certificateFeature.Load();
            anonymousFeature.Load();
            basicFeature.Load();
            digestFeature.Load();
            windowsFeature.Load();

            InitializeListPage();
        }
        protected override void Initialize(object navigationData)
        {
            base.Initialize(navigationData);
            var service = (IConfigurationService)GetService(typeof(IConfigurationService));

            pictureBox1.Image = service.Scope.GetImage();

            var certificateFeature = new ClientCertificateAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(certificateFeature, this));

            var anonymousFeature = new AnonymousAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(anonymousFeature, this));

            var impersonationFeature = new ImpersonationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(impersonationFeature, this));

            var basicFeature = new BasicAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(basicFeature, this));

            var digestFeature = new DigestAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(digestFeature, this));

            var formsFeature = new FormsAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(formsFeature, this));

            var windowsFeature = new WindowsAuthenticationFeature(Module);

            listView1.Items.Add(new AuthenticationListViewItem(windowsFeature, this));

            certificateFeature.Load();
            anonymousFeature.Load();
            impersonationFeature.Load();
            basicFeature.Load();
            digestFeature.Load();
            formsFeature.Load();
            windowsFeature.Load();

            InitializeListPage();
        }
 public FeatureTaskList(ImpersonationFeature owner)
 {
     _owner = owner;
 }