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
- PointAnimationClockResource.cs
- Literal.cs
- LocatorGroup.cs
- JoinSymbol.cs
- SafeTimerHandle.cs
- Scheduler.cs
- SplineKeyFrames.cs
- PointCollectionValueSerializer.cs
- CultureInfoConverter.cs
- IDataContractSurrogate.cs
- LayoutInformation.cs
- ControlBuilderAttribute.cs
- SelectionChangedEventArgs.cs
- EntityClassGenerator.cs
- RuleConditionDialog.Designer.cs
- LifetimeServices.cs
- QuaternionAnimationBase.cs
- GeometryDrawing.cs
- IdleTimeoutMonitor.cs
- ParameterExpression.cs
- ViewStateModeByIdAttribute.cs
- InkCanvasInnerCanvas.cs
- WebPartsSection.cs
- ParseHttpDate.cs
- ObjectDataSourceDisposingEventArgs.cs
- EntityDesignerUtils.cs
- ErrorTolerantObjectWriter.cs
- DataTable.cs
- XmlSchemaInferenceException.cs
- SerializationBinder.cs
- HttpHeaderCollection.cs
- SynchronousChannel.cs
- ServiceDescriptionSerializer.cs
- JsonWriterDelegator.cs
- UnsafeNativeMethods.cs
- RelationshipFixer.cs
- AutomationAttributeInfo.cs
- ImpersonateTokenRef.cs
- Activator.cs
- BaseDataListActionList.cs
- FormViewDeleteEventArgs.cs
- DocumentViewerBaseAutomationPeer.cs
- EdmRelationshipRoleAttribute.cs
- UdpDiscoveryEndpointProvider.cs
- RemotingConfigParser.cs
- TraceListener.cs
- BulletedListEventArgs.cs
- ProfileServiceManager.cs
- UnsafeNativeMethodsCLR.cs
- MenuItemBindingCollection.cs
- PopOutPanel.cs
- RijndaelManagedTransform.cs
- AbsoluteQuery.cs
- X509SecurityToken.cs
- Header.cs
- SQLRoleProvider.cs
- DrawToolTipEventArgs.cs
- LoadedOrUnloadedOperation.cs
- DataGridViewDataConnection.cs
- PermissionListSet.cs
- OperatingSystemVersionCheck.cs
- GAC.cs
- SecurityState.cs
- BufferedOutputAsyncStream.cs
- PeerNameResolver.cs
- RowToParametersTransformer.cs
- FormsAuthentication.cs
- ResourceDisplayNameAttribute.cs
- SerTrace.cs
- GeometryModel3D.cs
- SqlProfileProvider.cs
- CompositeFontParser.cs
- VisualStyleInformation.cs
- KnownBoxes.cs
- WebCategoryAttribute.cs
- ColumnTypeConverter.cs
- XmlHierarchyData.cs
- SiteMapNodeCollection.cs
- StorageSetMapping.cs
- DBCommand.cs
- ConfigurationHelpers.cs
- UpdatePanelTrigger.cs
- RuntimeTrackingProfile.cs
- IgnoreFileBuildProvider.cs
- LabelDesigner.cs
- Dynamic.cs
- PaintValueEventArgs.cs
- KeyValueInternalCollection.cs
- SQLRoleProvider.cs
- Compensation.cs
- OdbcDataReader.cs
- PasswordPropertyTextAttribute.cs
- ServerTooBusyException.cs
- ObjectDataSourceView.cs
- MembershipSection.cs
- NotFiniteNumberException.cs
- BaseDataBoundControl.cs
- ReachDocumentReferenceCollectionSerializer.cs
- QuaternionRotation3D.cs
- RelatedPropertyManager.cs