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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RewritingProcessor.cs
- TokenizerHelper.cs
- RoleManagerModule.cs
- HtmlTernaryTree.cs
- MenuBindingsEditorForm.cs
- SqlProcedureAttribute.cs
- AppDomainInstanceProvider.cs
- XDRSchema.cs
- ExplicitDiscriminatorMap.cs
- Translator.cs
- EntityDataSourceSelectedEventArgs.cs
- CacheVirtualItemsEvent.cs
- DataGridViewImageColumn.cs
- DispatcherExceptionFilterEventArgs.cs
- HtmlTableCell.cs
- DataGridViewLinkCell.cs
- RTLAwareMessageBox.cs
- LinqDataSourceDisposeEventArgs.cs
- AsyncOperationManager.cs
- ToolboxItemCollection.cs
- NonBatchDirectoryCompiler.cs
- PKCS1MaskGenerationMethod.cs
- HashFinalRequest.cs
- localization.cs
- ToolboxDataAttribute.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- EventMappingSettingsCollection.cs
- SelectionPattern.cs
- SystemGatewayIPAddressInformation.cs
- MaskedTextBoxDesignerActionList.cs
- TransformerInfoCollection.cs
- CustomLineCap.cs
- ClientScriptManagerWrapper.cs
- DependencySource.cs
- EntityDataSourceMemberPath.cs
- TrustManagerMoreInformation.cs
- BoundPropertyEntry.cs
- SqlDuplicator.cs
- ArrangedElementCollection.cs
- MetadataCacheItem.cs
- BinaryFormatterWriter.cs
- HttpInputStream.cs
- ServiceModelReg.cs
- AddInProcess.cs
- ListDictionaryInternal.cs
- SmiXetterAccessMap.cs
- BinaryConverter.cs
- ConfigurationManager.cs
- PhotoPrintingIntent.cs
- EventWaitHandleSecurity.cs
- UdpTransportSettings.cs
- ReflectEventDescriptor.cs
- ADMembershipProvider.cs
- TraceContextRecord.cs
- GatewayIPAddressInformationCollection.cs
- NamespaceInfo.cs
- PageContentCollection.cs
- UniformGrid.cs
- StrokeNodeData.cs
- TypeConstant.cs
- ComplusTypeValidator.cs
- DoubleSumAggregationOperator.cs
- HtmlToClrEventProxy.cs
- FixedPageStructure.cs
- EncryptedPackage.cs
- WebDescriptionAttribute.cs
- WmlCommandAdapter.cs
- ListSortDescriptionCollection.cs
- BrowserTree.cs
- ProviderUtil.cs
- AdCreatedEventArgs.cs
- LoadRetryStrategyFactory.cs
- DataControlFieldCollection.cs
- DisplayInformation.cs
- Italic.cs
- DispatcherSynchronizationContext.cs
- BitmapImage.cs
- Context.cs
- activationcontext.cs
- MsdtcClusterUtils.cs
- HtmlMeta.cs
- EntityDescriptor.cs
- Message.cs
- ButtonFlatAdapter.cs
- CodeTypeDeclaration.cs
- StaticContext.cs
- SqlCacheDependencyDatabaseCollection.cs
- BoolLiteral.cs
- XmlSchemaInferenceException.cs
- DecimalAnimationUsingKeyFrames.cs
- ObjectHelper.cs
- DesignerActionVerbItem.cs
- Roles.cs
- WasHttpModulesInstallComponent.cs
- ValueExpressions.cs
- XmlWriterSettings.cs
- ClientRolePrincipal.cs
- DocumentGridContextMenu.cs
- ImageCollectionCodeDomSerializer.cs
- DataColumn.cs