Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / TrustSection.cs / 1305376 / TrustSection.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.Diagnostics.CodeAnalysis; using System.IO; using System.Text; using System.Security.Permissions; /***************************************************************************** From machine.config[SectionComment("")] ******************************************************************************/ public sealed class TrustSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propLevel = new ConfigurationProperty("level", typeof(string), "Full", null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired); private static readonly ConfigurationProperty _propOriginUrl = new ConfigurationProperty("originUrl", typeof(string), String.Empty, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propProcessRequestInApplicationTrust = new ConfigurationProperty("processRequestInApplicationTrust", typeof(bool), true, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propLegacyCasModel = new ConfigurationProperty("legacyCasModel", typeof(bool), false, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propPermissionSetName = new ConfigurationProperty("permissionSetName", typeof(string), "ASP.Net", ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propHostSecurityPolicyResolverType = new ConfigurationProperty("hostSecurityPolicyResolverType", typeof(string), String.Empty, ConfigurationPropertyOptions.None); static TrustSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propLevel); _properties.Add(_propOriginUrl); _properties.Add(_propProcessRequestInApplicationTrust); _properties.Add(_propLegacyCasModel); _properties.Add(_propPermissionSetName); _properties.Add(_propHostSecurityPolicyResolverType); } public TrustSection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("level", IsRequired = true, DefaultValue = "Full")] [StringValidator(MinLength = 1)] public string Level { get { return (string)base[_propLevel]; } set { base[_propLevel] = value; } } [ConfigurationProperty("originUrl", DefaultValue = "")] public string OriginUrl { get { return (string)base[_propOriginUrl]; } set { base[_propOriginUrl] = value; } } [ConfigurationProperty("processRequestInApplicationTrust", DefaultValue = true)] public bool ProcessRequestInApplicationTrust { get { return (bool)base[_propProcessRequestInApplicationTrust]; } set { base[_propProcessRequestInApplicationTrust] = value; } } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Cas as Identifier is already used in CLR")] [ConfigurationProperty("legacyCasModel", DefaultValue = false)] public bool LegacyCasModel { get { return (bool)base[_propLegacyCasModel]; } set { base[_propLegacyCasModel] = value; } } [ConfigurationProperty("permissionSetName", DefaultValue = "ASP.Net")] public string PermissionSetName { get { return (string)base[_propPermissionSetName]; } set { base[_propPermissionSetName] = value; } } [ConfigurationProperty("hostSecurityPolicyResolverType", DefaultValue = "")] public string HostSecurityPolicyResolverType { get { return (string)base[_propHostSecurityPolicyResolverType]; } set { base[_propHostSecurityPolicyResolverType] = value; } } } } // 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.Diagnostics.CodeAnalysis; using System.IO; using System.Text; using System.Security.Permissions; /***************************************************************************** From machine.config[SectionComment("")] ******************************************************************************/ public sealed class TrustSection : ConfigurationSection { private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propLevel = new ConfigurationProperty("level", typeof(string), "Full", null, StdValidatorsAndConverters.NonEmptyStringValidator, ConfigurationPropertyOptions.IsRequired); private static readonly ConfigurationProperty _propOriginUrl = new ConfigurationProperty("originUrl", typeof(string), String.Empty, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propProcessRequestInApplicationTrust = new ConfigurationProperty("processRequestInApplicationTrust", typeof(bool), true, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propLegacyCasModel = new ConfigurationProperty("legacyCasModel", typeof(bool), false, ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propPermissionSetName = new ConfigurationProperty("permissionSetName", typeof(string), "ASP.Net", ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propHostSecurityPolicyResolverType = new ConfigurationProperty("hostSecurityPolicyResolverType", typeof(string), String.Empty, ConfigurationPropertyOptions.None); static TrustSection() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propLevel); _properties.Add(_propOriginUrl); _properties.Add(_propProcessRequestInApplicationTrust); _properties.Add(_propLegacyCasModel); _properties.Add(_propPermissionSetName); _properties.Add(_propHostSecurityPolicyResolverType); } public TrustSection() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("level", IsRequired = true, DefaultValue = "Full")] [StringValidator(MinLength = 1)] public string Level { get { return (string)base[_propLevel]; } set { base[_propLevel] = value; } } [ConfigurationProperty("originUrl", DefaultValue = "")] public string OriginUrl { get { return (string)base[_propOriginUrl]; } set { base[_propOriginUrl] = value; } } [ConfigurationProperty("processRequestInApplicationTrust", DefaultValue = true)] public bool ProcessRequestInApplicationTrust { get { return (bool)base[_propProcessRequestInApplicationTrust]; } set { base[_propProcessRequestInApplicationTrust] = value; } } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "Cas as Identifier is already used in CLR")] [ConfigurationProperty("legacyCasModel", DefaultValue = false)] public bool LegacyCasModel { get { return (bool)base[_propLegacyCasModel]; } set { base[_propLegacyCasModel] = value; } } [ConfigurationProperty("permissionSetName", DefaultValue = "ASP.Net")] public string PermissionSetName { get { return (string)base[_propPermissionSetName]; } set { base[_propPermissionSetName] = value; } } [ConfigurationProperty("hostSecurityPolicyResolverType", DefaultValue = "")] public string HostSecurityPolicyResolverType { get { return (string)base[_propHostSecurityPolicyResolverType]; } set { base[_propHostSecurityPolicyResolverType] = value; } } } } // 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
- ScriptReferenceEventArgs.cs
- EraserBehavior.cs
- HtmlAnchor.cs
- CodeTypeMember.cs
- OracleDataAdapter.cs
- XomlCompilerError.cs
- HtmlEmptyTagControlBuilder.cs
- ClientApiGenerator.cs
- SoapObjectInfo.cs
- PropertyBuilder.cs
- TypeListConverter.cs
- DefaultAssemblyResolver.cs
- EncryptedKeyHashIdentifierClause.cs
- SessionEndedEventArgs.cs
- Nullable.cs
- TypeLibConverter.cs
- ListContractAdapter.cs
- OleDbMetaDataFactory.cs
- DynamicResourceExtensionConverter.cs
- TraceInternal.cs
- CTreeGenerator.cs
- Point4DConverter.cs
- SHA384Managed.cs
- SafeNativeMethodsOther.cs
- LessThanOrEqual.cs
- RuntimeHelpers.cs
- MethodCallConverter.cs
- ToggleProviderWrapper.cs
- WebPartsSection.cs
- PersonalizationAdministration.cs
- handlecollector.cs
- SingleKeyFrameCollection.cs
- EnumerableCollectionView.cs
- ModelUtilities.cs
- RectAnimationBase.cs
- SiteMapNodeItem.cs
- AssociationEndMember.cs
- DataGridTable.cs
- NativeCppClassAttribute.cs
- Size3D.cs
- TreeNodeStyle.cs
- DataColumnMappingCollection.cs
- SqlComparer.cs
- RegisteredScript.cs
- SynchronizationContext.cs
- NamedPipeDuplicateContext.cs
- WebEncodingValidator.cs
- Win32SafeHandles.cs
- TextRangeEditLists.cs
- Control.cs
- ScaleTransform3D.cs
- DiagnosticsElement.cs
- ByteKeyFrameCollection.cs
- _NTAuthentication.cs
- UserControl.cs
- TypeCodeDomSerializer.cs
- Binding.cs
- ReversePositionQuery.cs
- TemplateApplicationHelper.cs
- TraceAsyncResult.cs
- MainMenu.cs
- GenericRootAutomationPeer.cs
- NumberSubstitution.cs
- SoapAttributeOverrides.cs
- ErrorFormatter.cs
- AccessControlList.cs
- StyleCollection.cs
- CacheChildrenQuery.cs
- TaskHelper.cs
- ResourceAttributes.cs
- RegexGroup.cs
- AutomationPropertyInfo.cs
- HttpCacheParams.cs
- SetterBase.cs
- TimeSpanStorage.cs
- Token.cs
- TextEditorCharacters.cs
- AxParameterData.cs
- TextFormatterHost.cs
- TemplateXamlParser.cs
- GridViewRowPresenterBase.cs
- ContextMenuStripGroup.cs
- SplitContainer.cs
- DataServiceRequestException.cs
- BindingListCollectionView.cs
- AssociationSetMetadata.cs
- SrgsToken.cs
- InvalidAsynchronousStateException.cs
- FloaterBaseParaClient.cs
- GenericPrincipal.cs
- SHA256Managed.cs
- dataSvcMapFileLoader.cs
- WebServiceResponseDesigner.cs
- InkCollectionBehavior.cs
- VectorAnimation.cs
- GenericWebPart.cs
- ManagedWndProcTracker.cs
- GrammarBuilderPhrase.cs
- XhtmlConformanceSection.cs
- CheckedPointers.cs