Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / SecurityPolicySection.cs / 5 / 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
- FileInfo.cs
- FixedFlowMap.cs
- QuaternionValueSerializer.cs
- AutomationIdentifierGuids.cs
- ForEach.cs
- RewritingProcessor.cs
- PartialList.cs
- WindowVisualStateTracker.cs
- UnionExpr.cs
- StringFunctions.cs
- EmptyEnumerable.cs
- HwndSourceParameters.cs
- CrossContextChannel.cs
- SqlCacheDependencyDatabase.cs
- CheckBox.cs
- Int64.cs
- PenThreadPool.cs
- DataQuery.cs
- DataControlFieldCell.cs
- HttpInputStream.cs
- TabItemWrapperAutomationPeer.cs
- FrameworkContentElementAutomationPeer.cs
- OleDbErrorCollection.cs
- CodeObject.cs
- HashRepartitionEnumerator.cs
- Permission.cs
- DataGridViewLinkCell.cs
- DataColumnMappingCollection.cs
- ClosureBinding.cs
- ListView.cs
- AnnotationResourceChangedEventArgs.cs
- DataSourceControlBuilder.cs
- XmlSchemaCompilationSettings.cs
- safesecurityhelperavalon.cs
- TableLayoutColumnStyleCollection.cs
- FormsAuthenticationCredentials.cs
- XmlSerializerVersionAttribute.cs
- ViewStateModeByIdAttribute.cs
- DataGridViewBand.cs
- UInt16Converter.cs
- FtpRequestCacheValidator.cs
- ConfigXmlText.cs
- SoapAttributes.cs
- PassportAuthentication.cs
- ContainerParagraph.cs
- sqlser.cs
- BitVec.cs
- DataGridViewRowPostPaintEventArgs.cs
- StorageEntityContainerMapping.cs
- SqlAggregateChecker.cs
- MenuCommandService.cs
- exports.cs
- Vector3DCollectionConverter.cs
- NavigateUrlConverter.cs
- MemoryFailPoint.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataFieldCollectionEditor.cs
- SingleQueryOperator.cs
- XmlNodeList.cs
- WindowsListViewSubItem.cs
- CalendarDataBindingHandler.cs
- ToolStripDropDownButton.cs
- Figure.cs
- KnownTypes.cs
- AxHost.cs
- UnmanagedMemoryStreamWrapper.cs
- FrameworkPropertyMetadata.cs
- Hyperlink.cs
- ByteAnimationUsingKeyFrames.cs
- ReadWriteObjectLock.cs
- SQLDoubleStorage.cs
- GifBitmapEncoder.cs
- AppDomainManager.cs
- DocumentCollection.cs
- Label.cs
- MinimizableAttributeTypeConverter.cs
- RegistryKey.cs
- SizeConverter.cs
- VBIdentifierTrimConverter.cs
- StyleTypedPropertyAttribute.cs
- ListBox.cs
- SerializerDescriptor.cs
- Control.cs
- ContentElement.cs
- TextDecorationCollection.cs
- TextPattern.cs
- HttpCapabilitiesSectionHandler.cs
- AQNBuilder.cs
- WmlPageAdapter.cs
- UInt32Storage.cs
- EUCJPEncoding.cs
- _CommandStream.cs
- MissingMemberException.cs
- ContentDesigner.cs
- _DomainName.cs
- HealthMonitoringSectionHelper.cs
- RequestBringIntoViewEventArgs.cs
- DataGridViewSortCompareEventArgs.cs
- SpellerStatusTable.cs
- XPathDocumentNavigator.cs