Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / PassportAuthentication.cs / 2 / PassportAuthentication.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /***************************************************************************** From machine.config******************************************************************************/ 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.Web.Util; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class PassportAuthentication : ConfigurationElement { private static readonly ConfigurationElementProperty s_elemProperty = new ConfigurationElementProperty(new CallbackValidator(typeof(PassportAuthentication), Validate)); private static ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propRedirectUrl = new ConfigurationProperty("redirectUrl", typeof(string), "internal", ConfigurationPropertyOptions.None); static PassportAuthentication() { // Property initialization _properties = new ConfigurationPropertyCollection(); _properties.Add(_propRedirectUrl); } public PassportAuthentication() { } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("redirectUrl", DefaultValue = "internal")] [StringValidator()] public string RedirectUrl { get { return (string)base[_propRedirectUrl]; } set { base[_propRedirectUrl] = value; } } protected override ConfigurationElementProperty ElementProperty { get { return s_elemProperty; } } private static void Validate(object value) { if (value == null) { throw new ArgumentNullException("passport"); } Debug.Assert(value is PassportAuthentication); PassportAuthentication elem = (PassportAuthentication)value; if (StringUtil.StringStartsWith(elem.RedirectUrl, "\\\\") || (elem.RedirectUrl.Length > 1 && elem.RedirectUrl[1] == ':')) { throw new ConfigurationErrorsException(SR.GetString(SR.Auth_bad_url)); } } } // class PassportAuthentication }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Sequence.cs
- DataTableMappingCollection.cs
- DateTimeValueSerializerContext.cs
- _ServiceNameStore.cs
- FlowNode.cs
- CloseCollectionAsyncResult.cs
- DriveNotFoundException.cs
- PriorityRange.cs
- StandardOleMarshalObject.cs
- ObjectFullSpanRewriter.cs
- InputLanguage.cs
- ProjectedSlot.cs
- NativeMethods.cs
- Stroke2.cs
- SchemaNames.cs
- COM2TypeInfoProcessor.cs
- EdmTypeAttribute.cs
- ArgumentOutOfRangeException.cs
- WorkflowPageSetupDialog.cs
- DBCSCodePageEncoding.cs
- BaseTemplateBuildProvider.cs
- ClientSettingsSection.cs
- CodeRemoveEventStatement.cs
- WebBrowserProgressChangedEventHandler.cs
- SQLStringStorage.cs
- Int32Collection.cs
- MorphHelper.cs
- Section.cs
- Geometry3D.cs
- IssuanceTokenProviderBase.cs
- ActivityExecutionContext.cs
- X509CertificateCollection.cs
- StateMachineWorkflowInstance.cs
- EntityContainerAssociationSetEnd.cs
- UnwrappedTypesXmlSerializerManager.cs
- _RegBlobWebProxyDataBuilder.cs
- AutomationPropertyInfo.cs
- DesignerForm.cs
- KoreanLunisolarCalendar.cs
- ObjectParameterCollection.cs
- OdbcCommandBuilder.cs
- Wizard.cs
- Function.cs
- DuplexSecurityProtocolFactory.cs
- ScrollProviderWrapper.cs
- RequestTimeoutManager.cs
- NumericUpDownAcceleration.cs
- XPathNavigatorKeyComparer.cs
- DataServiceRequest.cs
- KeyEvent.cs
- XmlIncludeAttribute.cs
- BufferedStream2.cs
- CompiledQueryCacheKey.cs
- _Connection.cs
- DragEvent.cs
- TreeNodeEventArgs.cs
- UrlMapping.cs
- SubtreeProcessor.cs
- PrimitiveDataContract.cs
- SvcMapFile.cs
- CharEntityEncoderFallback.cs
- SecurityBindingElementImporter.cs
- RoutedEventConverter.cs
- ResumeStoryboard.cs
- ActivityExecutorDelegateInfo.cs
- EventSetter.cs
- StandardToolWindows.cs
- RelationshipEnd.cs
- UIElementHelper.cs
- AttributeUsageAttribute.cs
- AsyncOperation.cs
- TimeSpanOrInfiniteValidator.cs
- MethodBuilderInstantiation.cs
- ExpandableObjectConverter.cs
- SafeBitVector32.cs
- SessionStateSection.cs
- PartialCachingControl.cs
- SafeEventLogWriteHandle.cs
- BitmapMetadataBlob.cs
- CqlIdentifiers.cs
- Padding.cs
- DeflateStream.cs
- RuntimeConfigLKG.cs
- ProxyWebPartManagerDesigner.cs
- ADRoleFactoryConfiguration.cs
- ContextMenuStripActionList.cs
- VirtualizingPanel.cs
- PersianCalendar.cs
- ProfileSettings.cs
- NavigationProgressEventArgs.cs
- ProcessModule.cs
- GeneralTransform.cs
- SymbolPair.cs
- CircleHotSpot.cs
- OletxCommittableTransaction.cs
- CodeConditionStatement.cs
- HandlerMappingMemo.cs
- DrawItemEvent.cs
- AccessibleObject.cs
- ZipIOLocalFileHeader.cs