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 / AuthorizationSection.cs / 1 / AuthorizationSection.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.Globalization;
using System.IO;
using System.Text;
using System.Security.Principal;
using System.Web.Util;
using System.ComponentModel;
using System.Security.Permissions;
/*
*/
///
/// Adds Authorization specific information to this section.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class AuthorizationSection : ConfigurationSection {
private static ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propRules =
new ConfigurationProperty(null, typeof(AuthorizationRuleCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
private bool _EveryoneAllowed = false;
internal bool EveryoneAllowed { get { return _EveryoneAllowed; } }
static AuthorizationSection() {
// Property initialization
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propRules);
}
public AuthorizationSection() {
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("", IsDefaultCollection = true)]
public AuthorizationRuleCollection Rules {
get {
return (AuthorizationRuleCollection)base[_propRules];
}
}
protected override void PostDeserialize() {
if (Rules.Count > 0) {
_EveryoneAllowed = (Rules[0].Action == AuthorizationRuleAction.Allow && Rules[0].Everyone);
}
}
internal bool IsUserAllowed(IPrincipal user, String verb) {
return Rules.IsUserAllowed(user, verb);
}
} // class AuthorizationSection
}
// 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.Globalization;
using System.IO;
using System.Text;
using System.Security.Principal;
using System.Web.Util;
using System.ComponentModel;
using System.Security.Permissions;
/*
*/
///
/// Adds Authorization specific information to this section.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class AuthorizationSection : ConfigurationSection {
private static ConfigurationPropertyCollection _properties;
private static readonly ConfigurationProperty _propRules =
new ConfigurationProperty(null, typeof(AuthorizationRuleCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
private bool _EveryoneAllowed = false;
internal bool EveryoneAllowed { get { return _EveryoneAllowed; } }
static AuthorizationSection() {
// Property initialization
_properties = new ConfigurationPropertyCollection();
_properties.Add(_propRules);
}
public AuthorizationSection() {
}
protected override ConfigurationPropertyCollection Properties {
get {
return _properties;
}
}
[ConfigurationProperty("", IsDefaultCollection = true)]
public AuthorizationRuleCollection Rules {
get {
return (AuthorizationRuleCollection)base[_propRules];
}
}
protected override void PostDeserialize() {
if (Rules.Count > 0) {
_EveryoneAllowed = (Rules[0].Action == AuthorizationRuleAction.Allow && Rules[0].Everyone);
}
}
internal bool IsUserAllowed(IPrincipal user, String verb) {
return Rules.IsUserAllowed(user, verb);
}
} // class AuthorizationSection
}
// 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
- XmlQueryType.cs
- TextTreeRootNode.cs
- WpfKnownType.cs
- ImageFormat.cs
- SelfIssuedAuthRSACryptoProvider.cs
- Logging.cs
- WebBrowserNavigatedEventHandler.cs
- AggregateNode.cs
- CfgArc.cs
- GroupBox.cs
- tibetanshape.cs
- HostDesigntimeLicenseContext.cs
- SrgsElementList.cs
- ActionFrame.cs
- ByteStreamMessage.cs
- linebase.cs
- ScopeCollection.cs
- BaseCodePageEncoding.cs
- Html32TextWriter.cs
- StylusPointPropertyUnit.cs
- ObjectDataSourceEventArgs.cs
- SqlInfoMessageEvent.cs
- PageParserFilter.cs
- IdentityHolder.cs
- WCFServiceClientProxyGenerator.cs
- ContextMenu.cs
- WebPageTraceListener.cs
- TraceLevelStore.cs
- XPathPatternParser.cs
- SqlCommandSet.cs
- DefaultProxySection.cs
- XmlLanguageConverter.cs
- ModulesEntry.cs
- Popup.cs
- PageCache.cs
- BrowserCapabilitiesCompiler.cs
- SspiSafeHandles.cs
- ApplicationHost.cs
- FreezableDefaultValueFactory.cs
- WizardStepCollectionEditor.cs
- AttachedAnnotation.cs
- QueryCursorEventArgs.cs
- FastEncoder.cs
- SqlReorderer.cs
- RegistrySecurity.cs
- DelegatedStream.cs
- FileSystemEventArgs.cs
- EdmType.cs
- MetadataLocation.cs
- InputProviderSite.cs
- FormViewActionList.cs
- ThicknessAnimationUsingKeyFrames.cs
- XmlEntity.cs
- ToolboxDataAttribute.cs
- ItemCheckEvent.cs
- DynamicResourceExtension.cs
- _OSSOCK.cs
- RTLAwareMessageBox.cs
- ListDictionaryInternal.cs
- ToolboxItemFilterAttribute.cs
- EventHandlers.cs
- SerialStream.cs
- Cursors.cs
- DataGridViewColumnEventArgs.cs
- IgnoreDataMemberAttribute.cs
- BitmapEffectGroup.cs
- cookieexception.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- DBConnectionString.cs
- PointCollectionConverter.cs
- AnnotationHighlightLayer.cs
- PaperSource.cs
- TypedRowGenerator.cs
- RenameRuleObjectDialog.Designer.cs
- EventBuilder.cs
- BinarySerializer.cs
- tabpagecollectioneditor.cs
- DocumentXPathNavigator.cs
- FormsAuthenticationModule.cs
- Invariant.cs
- SchemaImporterExtension.cs
- GridView.cs
- ObjectConverter.cs
- SchemaTableColumn.cs
- CompositeControl.cs
- DiscardableAttribute.cs
- ReachSerializer.cs
- ApplicationDirectoryMembershipCondition.cs
- PriorityItem.cs
- HttpHandlerAction.cs
- ServiceModelEnumValidatorAttribute.cs
- WindowInteractionStateTracker.cs
- CriticalHandle.cs
- ForeignKeyConstraint.cs
- HttpHandlerAction.cs
- Int32EqualityComparer.cs
- RoutedEventConverter.cs
- ProgressChangedEventArgs.cs
- MetadataAssemblyHelper.cs
- GPPOINT.cs