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
- Cursor.cs
- HttpRuntimeSection.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- TextViewSelectionProcessor.cs
- NavigateEvent.cs
- RuleSettingsCollection.cs
- HtmlInputButton.cs
- XmlNamespaceMapping.cs
- VisualBrush.cs
- CheckedPointers.cs
- WebPartZone.cs
- Ref.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- ControlEvent.cs
- EntityDataSourceColumn.cs
- StdValidatorsAndConverters.cs
- DataGridColumnCollection.cs
- ISessionStateStore.cs
- SafeNativeMethodsMilCoreApi.cs
- CallSite.cs
- SessionEndedEventArgs.cs
- ToolStripRenderEventArgs.cs
- MiniCustomAttributeInfo.cs
- SqlIdentifier.cs
- _StreamFramer.cs
- ButtonFlatAdapter.cs
- CustomAttributeFormatException.cs
- PseudoWebRequest.cs
- WebPartUtil.cs
- Adorner.cs
- TriggerCollection.cs
- ServiceProviders.cs
- TraceContext.cs
- XmlNotation.cs
- SqlClientWrapperSmiStream.cs
- PasswordTextContainer.cs
- Button.cs
- ReturnType.cs
- IODescriptionAttribute.cs
- WorkflowQueuingService.cs
- Comparer.cs
- RegistryKey.cs
- ConfigurationManagerInternal.cs
- NoneExcludedImageIndexConverter.cs
- HttpException.cs
- UriSection.cs
- WebPartDisplayModeCancelEventArgs.cs
- NavigationProperty.cs
- NetworkInformationException.cs
- Point3DConverter.cs
- AutomationPatternInfo.cs
- CompressionTransform.cs
- ResourceAssociationType.cs
- Aggregates.cs
- AssociationSet.cs
- ViewStateChangedEventArgs.cs
- ThemeableAttribute.cs
- SignatureDescription.cs
- WindowsIdentity.cs
- MediaSystem.cs
- ParserContext.cs
- MdiWindowListStrip.cs
- SoapSchemaMember.cs
- SSmlParser.cs
- CharUnicodeInfo.cs
- BitmapPalettes.cs
- CustomSignedXml.cs
- OpenTypeLayoutCache.cs
- Range.cs
- ResXFileRef.cs
- PrivacyNoticeElement.cs
- ObjectQueryProvider.cs
- ServiceAuthorizationBehavior.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- AppDomainUnloadedException.cs
- XslAstAnalyzer.cs
- SerializationSectionGroup.cs
- DataColumnPropertyDescriptor.cs
- WebBrowserEvent.cs
- SamlNameIdentifierClaimResource.cs
- Crc32.cs
- Msec.cs
- MarshalByRefObject.cs
- WebPartCancelEventArgs.cs
- CheckBoxList.cs
- InstancePersistenceEvent.cs
- MetadataPropertyAttribute.cs
- DecoderExceptionFallback.cs
- CodeGotoStatement.cs
- FrameworkContentElement.cs
- NumericUpDownAccelerationCollection.cs
- MessageSecurityTokenVersion.cs
- SspiSecurityTokenProvider.cs
- QilUnary.cs
- RelatedPropertyManager.cs
- Trigger.cs
- TextTreeUndo.cs
- DefaultSection.cs
- SqlGenericUtil.cs
- PerfProviderCollection.cs