Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FileNameEditor.cs
- ClientCultureInfo.cs
- ProfileSettingsCollection.cs
- ListViewTableRow.cs
- TextFormatterContext.cs
- SerializationTrace.cs
- CookieHandler.cs
- TrustLevelCollection.cs
- WebPartEditorOkVerb.cs
- FileAuthorizationModule.cs
- CompositeFontFamily.cs
- ConnectorSelectionGlyph.cs
- XmlEncodedRawTextWriter.cs
- DSASignatureFormatter.cs
- VisualBasicSettingsConverter.cs
- ProcessInfo.cs
- Compiler.cs
- CompareInfo.cs
- MiniAssembly.cs
- ResourceExpressionBuilder.cs
- IndexedEnumerable.cs
- ThemeDictionaryExtension.cs
- HttpHeaderCollection.cs
- ProviderBase.cs
- AnnotationObservableCollection.cs
- Vars.cs
- ConfigXmlText.cs
- DocumentPaginator.cs
- PrimaryKeyTypeConverter.cs
- IndependentlyAnimatedPropertyMetadata.cs
- CategoryAttribute.cs
- MailHeaderInfo.cs
- xmlglyphRunInfo.cs
- XmlEntity.cs
- ScrollBarRenderer.cs
- XMLUtil.cs
- WeakReferenceEnumerator.cs
- TextureBrush.cs
- CharacterMetrics.cs
- LoadRetryStrategyFactory.cs
- ping.cs
- ClientSettingsSection.cs
- processwaithandle.cs
- PreProcessInputEventArgs.cs
- NamedPermissionSet.cs
- TextBoxLine.cs
- BaseProcessProtocolHandler.cs
- ContentType.cs
- SqlOuterApplyReducer.cs
- WebPartManager.cs
- _NestedMultipleAsyncResult.cs
- CorrelationActionMessageFilter.cs
- FontEmbeddingManager.cs
- ServicePointManagerElement.cs
- Substitution.cs
- HttpModuleActionCollection.cs
- URLString.cs
- DataServiceClientException.cs
- XmlSerializerAssemblyAttribute.cs
- Win32.cs
- ProbeRequestResponseAsyncResult.cs
- DbException.cs
- VisualBasicSettingsHandler.cs
- HtmlInputPassword.cs
- SizeLimitedCache.cs
- QilSortKey.cs
- XmlSchemaProviderAttribute.cs
- DataObject.cs
- SqlStatistics.cs
- SpoolingTaskBase.cs
- BaseComponentEditor.cs
- XamlVector3DCollectionSerializer.cs
- SecurityPermission.cs
- SafeEventLogWriteHandle.cs
- AddInIpcChannel.cs
- CodeRemoveEventStatement.cs
- SqlDependencyUtils.cs
- versioninfo.cs
- MetadataSerializer.cs
- WebPartActionVerb.cs
- ParserExtension.cs
- PointIndependentAnimationStorage.cs
- FileSystemEventArgs.cs
- Vector3DKeyFrameCollection.cs
- WebWorkflowRole.cs
- BufferAllocator.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- BamlBinaryWriter.cs
- TargetPerspective.cs
- ArithmeticException.cs
- ColumnResizeUndoUnit.cs
- GroupDescription.cs
- DiscoveryEndpointValidator.cs
- WebBrowsableAttribute.cs
- Unit.cs
- DataObjectEventArgs.cs
- Misc.cs
- FilterQuery.cs
- Menu.cs
- BaseTreeIterator.cs