Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / AuthenticationConfig.cs / 1 / AuthenticationConfig.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * AuthenticationConfigHandler class * * Copyright (c) 1999 Microsoft Corporation */ namespace System.Web.Configuration { using System.Runtime.Serialization; using System.Web.Util; using System.Collections; using System.IO; using System.Security.Principal; using System.Xml; using System.Security.Cryptography; using System.Configuration; using System.Globalization; using System.Web.Hosting; static internal class AuthenticationConfig { internal static String GetCompleteLoginUrl(HttpContext context, String loginUrl) { if (String.IsNullOrEmpty(loginUrl)) { return String.Empty; } if (UrlPath.IsRelativeUrl(loginUrl)) { loginUrl = UrlPath.Combine(HttpRuntime.AppDomainAppVirtualPathString, loginUrl); } return loginUrl; } internal static bool AccessingLoginPage(HttpContext context, String loginUrl) { if (String.IsNullOrEmpty(loginUrl)) { return false; } loginUrl = GetCompleteLoginUrl(context, loginUrl); if (String.IsNullOrEmpty(loginUrl)) { return false; } // Ignore query string int iqs = loginUrl.IndexOf('?'); if (iqs >= 0) { loginUrl = loginUrl.Substring(0, iqs); } String requestPath = context.Request.Path; if (StringUtil.EqualsIgnoreCase(requestPath, loginUrl)) { return true; } // It could be that loginUrl in config was UrlEncoded (ASURT 98932) if (loginUrl.IndexOf('%') >= 0) { String decodedLoginUrl; // encoding is unknown try UTF-8 first, then request encoding decodedLoginUrl = HttpUtility.UrlDecode(loginUrl); if (StringUtil.EqualsIgnoreCase(requestPath, decodedLoginUrl)) { return true; } decodedLoginUrl = HttpUtility.UrlDecode(loginUrl, context.Request.ContentEncoding); if (StringUtil.EqualsIgnoreCase(requestPath, decodedLoginUrl)) { return true; } } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * AuthenticationConfigHandler class * * Copyright (c) 1999 Microsoft Corporation */ namespace System.Web.Configuration { using System.Runtime.Serialization; using System.Web.Util; using System.Collections; using System.IO; using System.Security.Principal; using System.Xml; using System.Security.Cryptography; using System.Configuration; using System.Globalization; using System.Web.Hosting; static internal class AuthenticationConfig { internal static String GetCompleteLoginUrl(HttpContext context, String loginUrl) { if (String.IsNullOrEmpty(loginUrl)) { return String.Empty; } if (UrlPath.IsRelativeUrl(loginUrl)) { loginUrl = UrlPath.Combine(HttpRuntime.AppDomainAppVirtualPathString, loginUrl); } return loginUrl; } internal static bool AccessingLoginPage(HttpContext context, String loginUrl) { if (String.IsNullOrEmpty(loginUrl)) { return false; } loginUrl = GetCompleteLoginUrl(context, loginUrl); if (String.IsNullOrEmpty(loginUrl)) { return false; } // Ignore query string int iqs = loginUrl.IndexOf('?'); if (iqs >= 0) { loginUrl = loginUrl.Substring(0, iqs); } String requestPath = context.Request.Path; if (StringUtil.EqualsIgnoreCase(requestPath, loginUrl)) { return true; } // It could be that loginUrl in config was UrlEncoded (ASURT 98932) if (loginUrl.IndexOf('%') >= 0) { String decodedLoginUrl; // encoding is unknown try UTF-8 first, then request encoding decodedLoginUrl = HttpUtility.UrlDecode(loginUrl); if (StringUtil.EqualsIgnoreCase(requestPath, decodedLoginUrl)) { return true; } decodedLoginUrl = HttpUtility.UrlDecode(loginUrl, context.Request.ContentEncoding); if (StringUtil.EqualsIgnoreCase(requestPath, decodedLoginUrl)) { return true; } } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Graph.cs
- NullableLongAverageAggregationOperator.cs
- AllMembershipCondition.cs
- ObjectStorage.cs
- CompilerScope.cs
- CodeTypeReference.cs
- ScrollData.cs
- OdbcUtils.cs
- BoolExpression.cs
- XPathAncestorQuery.cs
- DesignerVerbCollection.cs
- Metadata.cs
- DayRenderEvent.cs
- WebPartDisplayModeCollection.cs
- DataSourceHelper.cs
- WebPartEditorOkVerb.cs
- Bidi.cs
- XmlValidatingReader.cs
- BitmapEffectvisualstate.cs
- GroupBox.cs
- EntryWrittenEventArgs.cs
- TextCompositionManager.cs
- HttpRuntime.cs
- CustomAttribute.cs
- DataMemberConverter.cs
- DetailsViewCommandEventArgs.cs
- OleDbReferenceCollection.cs
- WebCategoryAttribute.cs
- VideoDrawing.cs
- DateTime.cs
- RootBuilder.cs
- ImageIndexEditor.cs
- HtmlInputControl.cs
- UnsafeNativeMethods.cs
- PrimitiveCodeDomSerializer.cs
- InvalidateEvent.cs
- Int32CAMarshaler.cs
- DataGridTablesFactory.cs
- LastQueryOperator.cs
- DataControlFieldHeaderCell.cs
- EntityDataSourceWrapperCollection.cs
- TextLine.cs
- InkPresenterAutomationPeer.cs
- VariableExpressionConverter.cs
- UInt32Converter.cs
- WebPartMenuStyle.cs
- MethodAccessException.cs
- MenuItemStyle.cs
- SystemUdpStatistics.cs
- SqlDependency.cs
- CacheOutputQuery.cs
- SHA384Managed.cs
- ExceptionRoutedEventArgs.cs
- DoubleCollection.cs
- ConvertEvent.cs
- PageAdapter.cs
- ProcessInfo.cs
- _CommandStream.cs
- InnerItemCollectionView.cs
- sapiproxy.cs
- BuilderPropertyEntry.cs
- HealthMonitoringSectionHelper.cs
- MobileContainerDesigner.cs
- Literal.cs
- Vector3DAnimation.cs
- ImageCollectionEditor.cs
- ColumnPropertiesGroup.cs
- XmlFileEditor.cs
- SafeHGlobalHandleCritical.cs
- VariableQuery.cs
- ModulesEntry.cs
- X509SecurityToken.cs
- TypeConverterValueSerializer.cs
- SoapFormatter.cs
- SmiConnection.cs
- MethodImplAttribute.cs
- SmtpSection.cs
- GridItemCollection.cs
- XslException.cs
- AdRotatorDesigner.cs
- PublisherIdentityPermission.cs
- TimeoutValidationAttribute.cs
- Errors.cs
- WebServiceClientProxyGenerator.cs
- SoapEnumAttribute.cs
- WorkflowCreationContext.cs
- DeflateInput.cs
- XmlAttributeCollection.cs
- StringFunctions.cs
- NamedObject.cs
- InvokeProviderWrapper.cs
- relpropertyhelper.cs
- AuthenticationService.cs
- XmlHierarchicalEnumerable.cs
- MethodAccessException.cs
- TextServicesCompartmentEventSink.cs
- CodeComment.cs
- TypedLocationWrapper.cs
- ArraySortHelper.cs
- SqlBuilder.cs