Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / Configuration / UrlAuthFailedErrorFormatter.cs / 1 / UrlAuthFailedErrorFormatter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * AuthorizationConfigHandler class * * Copyright (c) 1999 Microsoft Corporation */ namespace System.Web.Configuration { using System.Runtime.Serialization; using System.Web.Util; using System.Collections; using System.Collections.Specialized; using System.IO; using System.Security.Principal; using System.Xml; using System.Security.Cryptography; using System.Configuration; using System.Globalization; using System.Web.Management; ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// internal class UrlAuthFailedErrorFormatter : ErrorFormatter { private StringCollection _adaptiveMiscContent = new StringCollection(); internal UrlAuthFailedErrorFormatter() { } internal /*public*/ static string GetErrorText() { return GetErrorText(HttpContext.Current); } internal static string GetErrorText(HttpContext context) { bool dontShowSensitiveInfo = context.IsCustomErrorEnabled; return (new UrlAuthFailedErrorFormatter()).GetErrorMessage(context, dontShowSensitiveInfo); } protected override string ErrorTitle { get { return SR.GetString(SR.Assess_Denied_Title);} // "Access Denied } protected override string Description { get { return SR.GetString(SR.Assess_Denied_Description2); //"An error occurred while accessing the resources required to serve this request. This typically happens when the web server is not configured to give you access to the requested URL."; } } protected override string MiscSectionTitle { get { return SR.GetString(SR.Assess_Denied_Section_Title2); //return "Error message 401.2"; } } protected override string MiscSectionContent { get { // VSWhidbey 493720: Do Html encode to preserve space characters string miscContent = HttpUtility.FormatPlainTextAsHtml(SR.GetString(SR.Assess_Denied_Misc_Content2)); AdaptiveMiscContent.Add(miscContent); return miscContent; //return "Access denied due to the web server's configuration. Ask the web server's administrator for help."; } } protected override string ColoredSquareTitle { get { return null;} } protected override string ColoredSquareContent { get { return null;} } protected override StringCollection AdaptiveMiscContent { get { return _adaptiveMiscContent;} } protected override bool ShowSourceFileInfo { get { return false;} } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * AuthorizationConfigHandler class * * Copyright (c) 1999 Microsoft Corporation */ namespace System.Web.Configuration { using System.Runtime.Serialization; using System.Web.Util; using System.Collections; using System.Collections.Specialized; using System.IO; using System.Security.Principal; using System.Xml; using System.Security.Cryptography; using System.Configuration; using System.Globalization; using System.Web.Management; ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// internal class UrlAuthFailedErrorFormatter : ErrorFormatter { private StringCollection _adaptiveMiscContent = new StringCollection(); internal UrlAuthFailedErrorFormatter() { } internal /*public*/ static string GetErrorText() { return GetErrorText(HttpContext.Current); } internal static string GetErrorText(HttpContext context) { bool dontShowSensitiveInfo = context.IsCustomErrorEnabled; return (new UrlAuthFailedErrorFormatter()).GetErrorMessage(context, dontShowSensitiveInfo); } protected override string ErrorTitle { get { return SR.GetString(SR.Assess_Denied_Title);} // "Access Denied } protected override string Description { get { return SR.GetString(SR.Assess_Denied_Description2); //"An error occurred while accessing the resources required to serve this request. This typically happens when the web server is not configured to give you access to the requested URL."; } } protected override string MiscSectionTitle { get { return SR.GetString(SR.Assess_Denied_Section_Title2); //return "Error message 401.2"; } } protected override string MiscSectionContent { get { // VSWhidbey 493720: Do Html encode to preserve space characters string miscContent = HttpUtility.FormatPlainTextAsHtml(SR.GetString(SR.Assess_Denied_Misc_Content2)); AdaptiveMiscContent.Add(miscContent); return miscContent; //return "Access denied due to the web server's configuration. Ask the web server's administrator for help."; } } protected override string ColoredSquareTitle { get { return null;} } protected override string ColoredSquareContent { get { return null;} } protected override StringCollection AdaptiveMiscContent { get { return _adaptiveMiscContent;} } protected override bool ShowSourceFileInfo { get { return false;} } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpResponse.cs
- MetadataUtil.cs
- Stackframe.cs
- UpdatePanelTriggerCollection.cs
- KeyValueConfigurationCollection.cs
- NamedPipeChannelFactory.cs
- ConcurrentStack.cs
- XmlReflectionMember.cs
- HtmlTable.cs
- CollectionChangedEventManager.cs
- UnauthorizedAccessException.cs
- BreakSafeBase.cs
- Latin1Encoding.cs
- SnapLine.cs
- EventLogPermissionAttribute.cs
- AppSettingsExpressionBuilder.cs
- BitmapEffectDrawing.cs
- FtpRequestCacheValidator.cs
- EntityDataSourceWizardForm.cs
- EncoderBestFitFallback.cs
- DataKeyCollection.cs
- SocketException.cs
- ParameterReplacerVisitor.cs
- AutomationPropertyInfo.cs
- WebPartCloseVerb.cs
- RetrieveVirtualItemEventArgs.cs
- Types.cs
- OleDbStruct.cs
- TemplateControlBuildProvider.cs
- TextTrailingCharacterEllipsis.cs
- SourceItem.cs
- NamedPipeChannelFactory.cs
- NamespaceList.cs
- Dynamic.cs
- TextPointerBase.cs
- _NegoState.cs
- ExecutionEngineException.cs
- AnyAllSearchOperator.cs
- JsonClassDataContract.cs
- CqlParserHelpers.cs
- TableHeaderCell.cs
- SettingsProviderCollection.cs
- Activity.cs
- OracleString.cs
- ConsumerConnectionPoint.cs
- CngAlgorithm.cs
- prefixendpointaddressmessagefiltertable.cs
- SplineKeyFrames.cs
- CompositeDesignerAccessibleObject.cs
- ToolBarButton.cs
- DocumentsTrace.cs
- Rect.cs
- CreateUserErrorEventArgs.cs
- XmlNullResolver.cs
- KeyGestureValueSerializer.cs
- ArrangedElementCollection.cs
- WebPartVerb.cs
- PropertySet.cs
- UserPreferenceChangedEventArgs.cs
- XmlSchemas.cs
- ValidationRule.cs
- XslTransformFileEditor.cs
- SmiMetaData.cs
- DtdParser.cs
- StringConcat.cs
- ExecutorLocksHeldException.cs
- AsnEncodedData.cs
- OleDbDataReader.cs
- SkipStoryboardToFill.cs
- DatePickerTextBox.cs
- CodeEventReferenceExpression.cs
- DurableInstanceProvider.cs
- GroupBoxAutomationPeer.cs
- SHA256Managed.cs
- SolidColorBrush.cs
- basenumberconverter.cs
- COM2ICategorizePropertiesHandler.cs
- MetaTable.cs
- _NTAuthentication.cs
- LassoHelper.cs
- Int64Converter.cs
- ContentDisposition.cs
- Selection.cs
- PageContent.cs
- AssemblyBuilder.cs
- MessageUtil.cs
- TextCollapsingProperties.cs
- LinkTarget.cs
- SystemTcpStatistics.cs
- PrintingPermission.cs
- _OSSOCK.cs
- UpWmlMobileTextWriter.cs
- XamlWriter.cs
- WebBrowserNavigatingEventHandler.cs
- TextProperties.cs
- InheritablePropertyChangeInfo.cs
- ResizeGrip.cs
- DataRow.cs
- MachineSettingsSection.cs
- DataGridViewColumnCollectionEditor.cs