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
- GenerateScriptTypeAttribute.cs
- SmiTypedGetterSetter.cs
- DbConnectionPoolOptions.cs
- ItemsPresenter.cs
- MLangCodePageEncoding.cs
- PassportAuthentication.cs
- SrgsToken.cs
- SizeF.cs
- PageThemeBuildProvider.cs
- SelectingProviderEventArgs.cs
- DefaultEvaluationContext.cs
- MetabaseServerConfig.cs
- PrintPreviewDialog.cs
- Brush.cs
- ProfileInfo.cs
- HttpCacheVary.cs
- BaseTemplateBuildProvider.cs
- _RequestLifetimeSetter.cs
- BitArray.cs
- XmlUtil.cs
- SharedUtils.cs
- WebPartVerbsEventArgs.cs
- WindowsAltTab.cs
- OleDbPermission.cs
- HostSecurityManager.cs
- RectConverter.cs
- IndexOutOfRangeException.cs
- HostDesigntimeLicenseContext.cs
- ConstNode.cs
- RSAPKCS1KeyExchangeFormatter.cs
- InternalBase.cs
- DrawingContextDrawingContextWalker.cs
- SessionStateContainer.cs
- RuntimeHandles.cs
- ResourceProviderFactory.cs
- MessageDispatch.cs
- OdbcConnection.cs
- LabelLiteral.cs
- LocalBuilder.cs
- AncillaryOps.cs
- FileLevelControlBuilderAttribute.cs
- CounterSample.cs
- Resources.Designer.cs
- GcSettings.cs
- DBSqlParserTableCollection.cs
- BaseValidator.cs
- Size3D.cs
- TargetInvocationException.cs
- DataGridPageChangedEventArgs.cs
- CellParagraph.cs
- MasterPage.cs
- ArrangedElementCollection.cs
- RepeatButton.cs
- ShaderRenderModeValidation.cs
- SqlDataReaderSmi.cs
- Timer.cs
- HtmlControl.cs
- WebPartDescriptionCollection.cs
- XmlSchemaSimpleType.cs
- RepeaterItemCollection.cs
- invalidudtexception.cs
- CompoundFileStorageReference.cs
- HttpPostedFile.cs
- _ConnectStream.cs
- DelegatingMessage.cs
- StrokeCollection.cs
- SqlDataSourceSelectingEventArgs.cs
- TemplatedMailWebEventProvider.cs
- DtrList.cs
- CurrencyManager.cs
- GeneralTransformGroup.cs
- HttpApplicationFactory.cs
- DashStyles.cs
- controlskin.cs
- AuthenticationException.cs
- BinaryFormatterSinks.cs
- _ListenerResponseStream.cs
- SafeHandle.cs
- WebPartConnection.cs
- DataGridViewColumnDesigner.cs
- NumberAction.cs
- UntypedNullExpression.cs
- OptimalTextSource.cs
- SignedXml.cs
- NumericExpr.cs
- UnsafeNativeMethods.cs
- HandlerFactoryWrapper.cs
- TextViewBase.cs
- ProcessModule.cs
- ClosableStream.cs
- ObjectQuery_EntitySqlExtensions.cs
- XmlUnspecifiedAttribute.cs
- JpegBitmapDecoder.cs
- AspNetCompatibilityRequirementsAttribute.cs
- BamlLocalizationDictionary.cs
- ViewCellSlot.cs
- XmlSchemaComplexContent.cs
- serverconfig.cs
- WebServiceReceiveDesigner.cs
- PropertyRecord.cs