Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / Tools / xws_reg / System / ServiceModel / Install / Configuration / IIS7ConfigurationLoader.cs / 1 / IIS7ConfigurationLoader.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Install.Configuration { using WebAdmin = Microsoft.Web.Administration; using System; using System.Configuration; using System.Web.Configuration; internal sealed class IIS7ConfigurationLoader : ConfigurationLoader { WebAdmin.ServerManager serverManager = null; WebAdmin.Configuration applicationHostConfiguration = null; ConfigurationLoader configLoader; internal IIS7ConfigurationLoader(ConfigurationLoader configLoader) { if (null == configLoader) { throw new ArgumentNullException("configLoader"); } this.configLoader = configLoader; } internal static bool CheckApplicationHostInstalled() { IIS7ConfigurationLoader configLoader = new IIS7ConfigurationLoader(new NativeConfigurationLoader()); if (null != configLoader.ApplicationHostConfiguration) { return true; } else { return false; } } internal WebAdmin.Configuration ApplicationHostConfiguration { get { this.serverManager = new WebAdmin.ServerManager(); this.applicationHostConfiguration = this.serverManager.GetApplicationHostConfiguration(); return this.applicationHostConfiguration; } } internal WebAdmin.ConfigurationSection HttpHandlersSection { get { return this.ApplicationHostConfiguration.GetSection(this.HttpHandlersSectionPath); } } internal string HttpHandlersSectionPath { get {return "system.webServer/handlers"; } } internal WebAdmin.ConfigurationSection HttpModulesSection { get { return this.ApplicationHostConfiguration.GetSection(this.HttpModulesSectionPath); } } internal string HttpModulesSectionPath { get {return "system.webServer/modules"; } } internal WebAdmin.ConfigurationSection ListenerAdaptersSection { get { return this.ApplicationHostConfiguration.GetSection(this.ListenerAdaptersSectionPath); } } internal string ListenerAdaptersSectionPath { get { return "system.applicationHost/listenerAdapters"; } } internal override Configuration MachineConfiguration { get { return this.configLoader.MachineConfiguration; } } internal override Configuration RootWebConfiguration { get { return this.configLoader.RootWebConfiguration; } } internal override void Save() { if (null != this.applicationHostConfiguration) { this.serverManager.CommitChanges(); this.applicationHostConfiguration = null; this.serverManager = null; } this.configLoader.Save(); base.Save(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ItemContainerGenerator.cs
- SerializationSectionGroup.cs
- ActivityBuilderHelper.cs
- XmlAnyAttributeAttribute.cs
- FontFamilyValueSerializer.cs
- TreeNodeCollection.cs
- AstNode.cs
- ExpressionVisitorHelpers.cs
- StateManager.cs
- FlowPosition.cs
- XmlWellformedWriter.cs
- GroupItemAutomationPeer.cs
- MessageQueueCriteria.cs
- SystemTcpStatistics.cs
- StringFreezingAttribute.cs
- DoubleAnimationUsingPath.cs
- TypeBuilderInstantiation.cs
- LabelAutomationPeer.cs
- FieldMetadata.cs
- OneWayElement.cs
- AdapterUtil.cs
- ApplyHostConfigurationBehavior.cs
- ImageIndexEditor.cs
- DataGridColumnHeader.cs
- CodeGenerator.cs
- Form.cs
- SQlBooleanStorage.cs
- SqlWorkflowPersistenceService.cs
- ByteFacetDescriptionElement.cs
- ActivityExecutionFilter.cs
- SetUserPreferenceRequest.cs
- WindowsIPAddress.cs
- DatePickerAutomationPeer.cs
- CodeEventReferenceExpression.cs
- Binding.cs
- ContextProperty.cs
- ProgressPage.cs
- WriteFileContext.cs
- ComponentRenameEvent.cs
- NetSectionGroup.cs
- StylusButton.cs
- SystemNetworkInterface.cs
- DesignTimeVisibleAttribute.cs
- DbQueryCommandTree.cs
- WSSecurityXXX2005.cs
- SamlSubject.cs
- SmiGettersStream.cs
- MimeParameter.cs
- ObjectDataSourceEventArgs.cs
- COM2IDispatchConverter.cs
- ProviderIncompatibleException.cs
- SSmlParser.cs
- InternalConfigHost.cs
- Point3DConverter.cs
- Page.cs
- HttpFileCollection.cs
- AlternateView.cs
- WindowsSspiNegotiation.cs
- WebFormsRootDesigner.cs
- sqlstateclientmanager.cs
- path.cs
- SqlSupersetValidator.cs
- DecryptRequest.cs
- TableLayoutRowStyleCollection.cs
- DrawingAttributesDefaultValueFactory.cs
- ExternalCalls.cs
- JsonWriterDelegator.cs
- DataGridViewRowPostPaintEventArgs.cs
- IntPtr.cs
- CacheDependency.cs
- ListComponentEditorPage.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- RootProfilePropertySettingsCollection.cs
- ToolStripGrip.cs
- FixedDocumentSequencePaginator.cs
- _IPv4Address.cs
- UidPropertyAttribute.cs
- ProfileModule.cs
- UrlPath.cs
- PeerCredentialElement.cs
- PagesChangedEventArgs.cs
- BitmapFrame.cs
- ClientRuntimeConfig.cs
- IPGlobalProperties.cs
- InputBindingCollection.cs
- MemberJoinTreeNode.cs
- UIntPtr.cs
- SqlRetyper.cs
- VirtualDirectoryMapping.cs
- Properties.cs
- GestureRecognitionResult.cs
- StringPropertyBuilder.cs
- BitmapFrameDecode.cs
- SignatureTargetIdManager.cs
- AtomEntry.cs
- OdbcTransaction.cs
- DataGridDesigner.cs
- ByteStack.cs
- XPathNode.cs
- SiteMapNodeCollection.cs