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
- Bold.cs
- PropertyConverter.cs
- DocumentCollection.cs
- UserCancellationException.cs
- PhysicalAddress.cs
- oledbmetadatacollectionnames.cs
- MaxMessageSizeStream.cs
- SqlUdtInfo.cs
- CommandField.cs
- HMACMD5.cs
- TrustManagerPromptUI.cs
- TextEndOfSegment.cs
- XmlSchemaSimpleTypeUnion.cs
- InvokeWebServiceDesigner.cs
- JoinCqlBlock.cs
- EventSetter.cs
- activationcontext.cs
- WindowsPrincipal.cs
- X509SecurityToken.cs
- DataContractSerializer.cs
- WebPartsSection.cs
- SchemaSetCompiler.cs
- MobileUITypeEditor.cs
- IssuedTokenClientElement.cs
- Baml2006ReaderContext.cs
- _FtpControlStream.cs
- CopyNamespacesAction.cs
- RawStylusSystemGestureInputReport.cs
- TypedTableGenerator.cs
- ImportContext.cs
- ProcessModuleDesigner.cs
- MaterialGroup.cs
- OperationFormatter.cs
- DeploymentSection.cs
- WebServiceResponse.cs
- TabControlCancelEvent.cs
- CertificateReferenceElement.cs
- Range.cs
- SqlDependency.cs
- MethodAccessException.cs
- TextEndOfSegment.cs
- XmlDataImplementation.cs
- DoubleMinMaxAggregationOperator.cs
- ResourceCategoryAttribute.cs
- BStrWrapper.cs
- NameValueConfigurationCollection.cs
- Activity.cs
- SequenceFullException.cs
- InstanceDataCollection.cs
- XmlDictionaryString.cs
- FirstQueryOperator.cs
- SByteStorage.cs
- MimeXmlReflector.cs
- ResourceReferenceKeyNotFoundException.cs
- WmpBitmapEncoder.cs
- SchemeSettingElement.cs
- CaseInsensitiveOrdinalStringComparer.cs
- EmptyElement.cs
- RayMeshGeometry3DHitTestResult.cs
- CompilerScopeManager.cs
- ReflectionUtil.cs
- DBNull.cs
- HttpProtocolImporter.cs
- SchemaInfo.cs
- QueryOptionExpression.cs
- WindowProviderWrapper.cs
- FormViewModeEventArgs.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- Material.cs
- EventEntry.cs
- PathSegmentCollection.cs
- ToolStripLocationCancelEventArgs.cs
- Pair.cs
- ApplicationManager.cs
- TextElement.cs
- Calendar.cs
- BitmapPalettes.cs
- StringKeyFrameCollection.cs
- SqlConnectionPoolProviderInfo.cs
- SoapHeaderAttribute.cs
- UrlPropertyAttribute.cs
- ObjectItemNoOpAssemblyLoader.cs
- StaticFileHandler.cs
- DataGridCellsPanel.cs
- ElementUtil.cs
- FactoryGenerator.cs
- RuleSettings.cs
- KeyGesture.cs
- cookiecontainer.cs
- GCHandleCookieTable.cs
- Identity.cs
- OleDbSchemaGuid.cs
- MailAddressParser.cs
- ScrollPatternIdentifiers.cs
- ReadWriteObjectLock.cs
- RegistryPermission.cs
- TextDecorationCollection.cs
- PointCollectionValueSerializer.cs
- Expressions.cs
- NetworkInformationPermission.cs