Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / SecurityPolicySection.cs / 1 / SecurityPolicySection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.ComponentModel; using System.Security.Permissions; /* This data is in a location in Machine.Config... How do I deal with that? For now I will leave the section in machine.config, The initialization of the trust levels are overwritable in this collection.*/ [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class SecurityPolicySection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propTrustLevels = new ConfigurationProperty(null, typeof(TrustLevelCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); static SecurityPolicySection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propTrustLevels); } public SecurityPolicySection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("", IsDefaultCollection = true)] public TrustLevelCollection TrustLevels { get { return (TrustLevelCollection)base[_propTrustLevels]; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.ComponentModel; using System.Security.Permissions; /* This data is in a location in Machine.Config... How do I deal with that? For now I will leave the section in machine.config, The initialization of the trust levels are overwritable in this collection.*/ [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class SecurityPolicySection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propTrustLevels = new ConfigurationProperty(null, typeof(TrustLevelCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); static SecurityPolicySection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propTrustLevels); } public SecurityPolicySection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("", IsDefaultCollection = true)] public TrustLevelCollection TrustLevels { get { return (TrustLevelCollection)base[_propTrustLevels]; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProviderSettings.cs
- SchemaMerger.cs
- KnownColorTable.cs
- MethodBuilder.cs
- AssemblyCacheEntry.cs
- StatusBarAutomationPeer.cs
- EntityContainerRelationshipSet.cs
- NotSupportedException.cs
- SmiContextFactory.cs
- DataBindingHandlerAttribute.cs
- MonikerHelper.cs
- COM2ExtendedTypeConverter.cs
- SlipBehavior.cs
- DocumentGrid.cs
- TextEditorCopyPaste.cs
- QfeChecker.cs
- AppearanceEditorPart.cs
- SiteMembershipCondition.cs
- DataExchangeServiceBinder.cs
- WorkflowApplicationTerminatedException.cs
- BitmapFrame.cs
- RefreshEventArgs.cs
- DirectionalLight.cs
- ThreadExceptionDialog.cs
- SqlRowUpdatedEvent.cs
- BaseProcessProtocolHandler.cs
- ProfileEventArgs.cs
- FileInfo.cs
- HtmlInputFile.cs
- GuidTagList.cs
- TextContainer.cs
- ListMarkerSourceInfo.cs
- coordinator.cs
- RegexStringValidatorAttribute.cs
- FilterableData.cs
- UserValidatedEventArgs.cs
- EventPropertyMap.cs
- EntityConnection.cs
- Point3DAnimationBase.cs
- DataGridViewDataErrorEventArgs.cs
- InsufficientMemoryException.cs
- Pkcs7Signer.cs
- BaseCodeDomTreeGenerator.cs
- SessionStateModule.cs
- SettingsPropertyValueCollection.cs
- TextEditorThreadLocalStore.cs
- WebPartManagerDesigner.cs
- XmlILTrace.cs
- SqlDataReaderSmi.cs
- TileModeValidation.cs
- GacUtil.cs
- WriteFileContext.cs
- TypeResolvingOptionsAttribute.cs
- BindingList.cs
- SeekableReadStream.cs
- HyperLinkColumn.cs
- XmlRawWriter.cs
- HttpModuleActionCollection.cs
- xmlformatgeneratorstatics.cs
- FreeFormDesigner.cs
- ConfigurationStrings.cs
- StdRegProviderWrapper.cs
- ChannelPool.cs
- shaper.cs
- HtmlElementEventArgs.cs
- EntityPropertyMappingAttribute.cs
- DateBoldEvent.cs
- MultipartIdentifier.cs
- HttpModulesSection.cs
- DataSourceControlBuilder.cs
- NumberFunctions.cs
- DataObjectCopyingEventArgs.cs
- CollectionDataContractAttribute.cs
- SqlCaseSimplifier.cs
- FormViewRow.cs
- MethodSignatureGenerator.cs
- ScriptControlDescriptor.cs
- InstanceData.cs
- sqlstateclientmanager.cs
- Image.cs
- AnalyzedTree.cs
- ContractCodeDomInfo.cs
- ComponentCollection.cs
- ObjectItemCollection.cs
- MenuItemBinding.cs
- DesignerEditorPartChrome.cs
- ItemCollection.cs
- FloatUtil.cs
- SynchronousChannel.cs
- HintTextConverter.cs
- NameService.cs
- DetailsViewInsertedEventArgs.cs
- BuildProviderUtils.cs
- EnvironmentPermission.cs
- SqlEnums.cs
- Panel.cs
- EventDescriptor.cs
- OutputCacheSection.cs
- HtmlInputControl.cs
- MLangCodePageEncoding.cs