Code:
/ DotNET / DotNET / 8.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
- Lookup.cs
- EdmComplexTypeAttribute.cs
- DefaultPrintController.cs
- DesignerSerializationManager.cs
- SystemIPGlobalProperties.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- GeneratedCodeAttribute.cs
- UpdatePanelTriggerCollection.cs
- ContextMarshalException.cs
- FacetDescription.cs
- MailAddressCollection.cs
- MasterPage.cs
- WebMessageEncodingElement.cs
- WebPartEditorOkVerb.cs
- SafeHandles.cs
- UpWmlMobileTextWriter.cs
- FormViewModeEventArgs.cs
- SessionStateSection.cs
- DataRelation.cs
- TextTreeTextElementNode.cs
- ReachFixedDocumentSerializerAsync.cs
- InternalConfigEventArgs.cs
- KeyInfo.cs
- ProjectionPruner.cs
- UrlMapping.cs
- MDIWindowDialog.cs
- MulticastOption.cs
- QuaternionAnimation.cs
- TableCell.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- PathSegmentCollection.cs
- IndependentAnimationStorage.cs
- CqlParserHelpers.cs
- ToolStripDropDownItem.cs
- ListChunk.cs
- DrawingBrush.cs
- DataGridTextBoxColumn.cs
- AsnEncodedData.cs
- TreeNodeBinding.cs
- Validator.cs
- LineMetrics.cs
- RichTextBox.cs
- DebugHandleTracker.cs
- DataTableClearEvent.cs
- ScriptManager.cs
- SoapAttributes.cs
- ItemType.cs
- HeaderedItemsControl.cs
- AuthenticationServiceManager.cs
- UnicodeEncoding.cs
- PropertyBuilder.cs
- CommandTreeTypeHelper.cs
- NativeMethods.cs
- ToolStripComboBox.cs
- XPathQueryGenerator.cs
- PopupRootAutomationPeer.cs
- IRCollection.cs
- Context.cs
- DataRow.cs
- NotSupportedException.cs
- ConfigurationManagerHelper.cs
- IndicCharClassifier.cs
- ContainerFilterService.cs
- _HeaderInfoTable.cs
- DropTarget.cs
- XmlNamespaceDeclarationsAttribute.cs
- BoundsDrawingContextWalker.cs
- GraphicsContext.cs
- MatrixConverter.cs
- TranslateTransform3D.cs
- XsltConvert.cs
- RepeaterItem.cs
- BuilderPropertyEntry.cs
- HttpModuleAction.cs
- ArrangedElementCollection.cs
- HandledEventArgs.cs
- FontDialog.cs
- HttpApplicationFactory.cs
- DefinitionUpdate.cs
- keycontainerpermission.cs
- AssociationType.cs
- SortedDictionary.cs
- WasEndpointConfigContainer.cs
- infer.cs
- SchemaElementDecl.cs
- AttributeTable.cs
- LocationSectionRecord.cs
- DataGridSortCommandEventArgs.cs
- RuntimeHelpers.cs
- InternalConfigEventArgs.cs
- MailHeaderInfo.cs
- AccessibleObject.cs
- ByteStreamGeometryContext.cs
- VarInfo.cs
- parserscommon.cs
- CookielessData.cs
- MessageBox.cs
- AtlasWeb.Designer.cs
- ClientTargetSection.cs
- ScriptHandlerFactory.cs