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
- MexHttpsBindingCollectionElement.cs
- ButtonFlatAdapter.cs
- BrowsableAttribute.cs
- NamedPermissionSet.cs
- RegionIterator.cs
- FileUtil.cs
- DataDesignUtil.cs
- nulltextcontainer.cs
- RequestCache.cs
- ValueConversionAttribute.cs
- GcSettings.cs
- DataPagerFieldCommandEventArgs.cs
- KeysConverter.cs
- OpenFileDialog.cs
- XmlObjectSerializerWriteContextComplex.cs
- MouseWheelEventArgs.cs
- DataRecordObjectView.cs
- wmiprovider.cs
- SimpleRecyclingCache.cs
- EntityTypeBase.cs
- OletxTransactionFormatter.cs
- XmlToDatasetMap.cs
- AvTraceDetails.cs
- ComNativeDescriptor.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ManagementExtension.cs
- MatchingStyle.cs
- OrderPreservingMergeHelper.cs
- WebPartCatalogCloseVerb.cs
- GeneratedView.cs
- XPathArrayIterator.cs
- UntypedNullExpression.cs
- CodeSnippetCompileUnit.cs
- ColumnHeaderConverter.cs
- LazyTextWriterCreator.cs
- InfoCardCryptoHelper.cs
- CriticalFinalizerObject.cs
- OdbcDataReader.cs
- TextEncodedRawTextWriter.cs
- DrawingBrush.cs
- SecurityKeyType.cs
- KerberosSecurityTokenAuthenticator.cs
- SchemaRegistration.cs
- SqlFunctionAttribute.cs
- AxHost.cs
- XslNumber.cs
- DetailsViewUpdatedEventArgs.cs
- HttpProfileBase.cs
- FillBehavior.cs
- RadioButton.cs
- WebPartConnectionsConfigureVerb.cs
- DelegatingConfigHost.cs
- SecurityVerifiedMessage.cs
- CalendarDateRange.cs
- WindowsFormsEditorServiceHelper.cs
- QilSortKey.cs
- PathSegment.cs
- DisplayNameAttribute.cs
- Graph.cs
- SolidBrush.cs
- followingsibling.cs
- ConstructorNeedsTagAttribute.cs
- FrameworkContentElement.cs
- WsdlServiceChannelBuilder.cs
- BulletChrome.cs
- ConfigurationStrings.cs
- CodeTypeMemberCollection.cs
- RequiredFieldValidator.cs
- MediaElement.cs
- UriTemplateQueryValue.cs
- FileUpload.cs
- EpmTargetTree.cs
- OleStrCAMarshaler.cs
- PersistenceTypeAttribute.cs
- DebugView.cs
- XmlTextAttribute.cs
- OrderedEnumerableRowCollection.cs
- TimerElapsedEvenArgs.cs
- CqlParser.cs
- Itemizer.cs
- CombinedGeometry.cs
- OdbcConnectionStringbuilder.cs
- PathGeometry.cs
- Color.cs
- CodeDOMProvider.cs
- BamlVersionHeader.cs
- RSAPKCS1SignatureFormatter.cs
- ComponentRenameEvent.cs
- SegmentInfo.cs
- AppManager.cs
- XmlSchemaAny.cs
- SqlProfileProvider.cs
- XmlMapping.cs
- RoutedEventHandlerInfo.cs
- SharedPersonalizationStateInfo.cs
- ScriptingAuthenticationServiceSection.cs
- storepermissionattribute.cs
- LingerOption.cs
- ChangeTracker.cs
- PrintDialog.cs