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
- ExceptionNotification.cs
- _DomainName.cs
- XmlObjectSerializerReadContext.cs
- CreateUserWizardDesigner.cs
- XmlMessageFormatter.cs
- NullExtension.cs
- KeyBinding.cs
- SiteMembershipCondition.cs
- EncodingDataItem.cs
- StrokeNodeOperations2.cs
- ChannelTokenTypeConverter.cs
- EntityDataSourceMemberPath.cs
- ScriptControl.cs
- XmlName.cs
- Font.cs
- NativeMethodsOther.cs
- QuaternionAnimation.cs
- CryptoApi.cs
- Terminate.cs
- Metafile.cs
- HoistedLocals.cs
- Viewport3DAutomationPeer.cs
- SqlDataAdapter.cs
- ReaderWriterLockWrapper.cs
- PageSetupDialog.cs
- DataListItemEventArgs.cs
- LayoutUtils.cs
- RouteData.cs
- PasswordRecovery.cs
- ThemeableAttribute.cs
- ScrollBarAutomationPeer.cs
- PowerEase.cs
- HyperLink.cs
- EventDescriptor.cs
- GridViewAutomationPeer.cs
- SchemaLookupTable.cs
- EpmSyndicationContentDeSerializer.cs
- MemberAssignmentAnalysis.cs
- CollectionViewGroupRoot.cs
- ApplicationProxyInternal.cs
- TextEditorThreadLocalStore.cs
- ApplicationSecurityInfo.cs
- AlignmentYValidation.cs
- ECDsa.cs
- GZipUtils.cs
- SqlCacheDependencyDatabase.cs
- LinqDataView.cs
- SQLInt32.cs
- DetailsViewUpdatedEventArgs.cs
- ValueType.cs
- DiagnosticTrace.cs
- JumpList.cs
- PixelFormat.cs
- Quaternion.cs
- MetadataProperty.cs
- CatalogPartChrome.cs
- CatalogUtil.cs
- SelectionRange.cs
- BuildResult.cs
- ExclusiveTcpListener.cs
- DbDataAdapter.cs
- ProgressBarBrushConverter.cs
- TransformCollection.cs
- ZoneIdentityPermission.cs
- DispatcherFrame.cs
- RoutingTable.cs
- StatusBarPanelClickEvent.cs
- QueryCursorEventArgs.cs
- TreeViewItemAutomationPeer.cs
- Root.cs
- CustomSignedXml.cs
- WebServiceMethodData.cs
- ComponentRenameEvent.cs
- PageWrapper.cs
- WorkflowServiceOperationListItem.cs
- XmlQueryCardinality.cs
- QueryRewriter.cs
- AtomServiceDocumentSerializer.cs
- SystemKeyConverter.cs
- TextCharacters.cs
- HttpRequestCacheValidator.cs
- TypeReference.cs
- TrustLevelCollection.cs
- Rules.cs
- PropertyValueUIItem.cs
- ProcessInfo.cs
- PreProcessor.cs
- SizeAnimationClockResource.cs
- OracleBoolean.cs
- ElementHostAutomationPeer.cs
- HttpContext.cs
- EventListenerClientSide.cs
- AnimationTimeline.cs
- _SslStream.cs
- SqlUdtInfo.cs
- ControlParameter.cs
- PropertyInfoSet.cs
- HtmlEncodedRawTextWriter.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- UnsafeNativeMethods.cs