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
- XmlNamedNodeMap.cs
- TrackingProfile.cs
- ParserStack.cs
- ValueUtilsSmi.cs
- PropertyNames.cs
- SqlFunctions.cs
- DesignerObject.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ReferenceEqualityComparer.cs
- EntityModelBuildProvider.cs
- InputProviderSite.cs
- SchemaTypeEmitter.cs
- BufferedReceiveElement.cs
- DocumentEventArgs.cs
- DescendantBaseQuery.cs
- WorkflowDesignerColors.cs
- TableItemProviderWrapper.cs
- SpecularMaterial.cs
- XamlTreeBuilderBamlRecordWriter.cs
- DesignSurfaceManager.cs
- OdbcConnectionFactory.cs
- assertwrapper.cs
- control.ime.cs
- InputBinding.cs
- XmlSchemaSimpleContentRestriction.cs
- DetailsViewRowCollection.cs
- DataQuery.cs
- LinearKeyFrames.cs
- Graphics.cs
- UserNamePasswordValidator.cs
- WCFBuildProvider.cs
- EditableRegion.cs
- GZipDecoder.cs
- WebColorConverter.cs
- ResXFileRef.cs
- BinaryObjectWriter.cs
- JapaneseLunisolarCalendar.cs
- ControlCollection.cs
- SamlAssertion.cs
- EncoderParameters.cs
- LinkDescriptor.cs
- UTF7Encoding.cs
- ConditionalBranch.cs
- SqlParameter.cs
- SecurityNegotiationException.cs
- HttpWebResponse.cs
- EventHandlers.cs
- Package.cs
- DictionaryContent.cs
- IndexerNameAttribute.cs
- XsltException.cs
- BitmapInitialize.cs
- _ProxyChain.cs
- CapabilitiesSection.cs
- FocusWithinProperty.cs
- SoapTypeAttribute.cs
- ExternalException.cs
- SByte.cs
- CounterSampleCalculator.cs
- Group.cs
- DynamicActivityXamlReader.cs
- SessionSwitchEventArgs.cs
- FontFamily.cs
- RadioButtonAutomationPeer.cs
- BatchParser.cs
- SafeWaitHandle.cs
- ConfigurationStrings.cs
- PageCatalogPart.cs
- XmlSchemaValidationException.cs
- MoveSizeWinEventHandler.cs
- WebBaseEventKeyComparer.cs
- DataBinding.cs
- TextDecorationLocationValidation.cs
- WebBrowserBase.cs
- MultiTrigger.cs
- FusionWrap.cs
- SpecialNameAttribute.cs
- XmlBufferReader.cs
- ISSmlParser.cs
- UnionCqlBlock.cs
- InternalBufferOverflowException.cs
- ColumnPropertiesGroup.cs
- UInt32.cs
- LeaseManager.cs
- WebConfigurationManager.cs
- CollectionMarkupSerializer.cs
- ParallelLoopState.cs
- StronglyTypedResourceBuilder.cs
- TimeSpanConverter.cs
- HttpContext.cs
- PersistenceTypeAttribute.cs
- SizeChangedInfo.cs
- TextFormatterHost.cs
- PrePrepareMethodAttribute.cs
- PerfService.cs
- Privilege.cs
- FlowNode.cs
- SafeNativeMethodsOther.cs
- AssemblyInfo.cs
- SqlVisitor.cs