Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / UrlAuthFailedErrorFormatter.cs / 2 / 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;} } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlCalendarAdapter.cs
- HtmlContainerControl.cs
- Delegate.cs
- PriorityBindingExpression.cs
- CharEnumerator.cs
- ScrollableControl.cs
- IOThreadScheduler.cs
- ResourceType.cs
- DesignColumnCollection.cs
- SessionStateItemCollection.cs
- SeekStoryboard.cs
- CodeExpressionCollection.cs
- PartitionResolver.cs
- SapiInterop.cs
- ObjectNotFoundException.cs
- TypeDescriptorContext.cs
- Point3DCollection.cs
- SamlAuthorityBinding.cs
- StringConverter.cs
- SerializationObjectManager.cs
- ScrollBarAutomationPeer.cs
- TextProperties.cs
- Keyboard.cs
- Effect.cs
- NotCondition.cs
- XhtmlConformanceSection.cs
- WebService.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- DialogResultConverter.cs
- path.cs
- SchemaElementLookUpTable.cs
- Fonts.cs
- TileModeValidation.cs
- Matrix.cs
- DataBoundLiteralControl.cs
- HttpPostServerProtocol.cs
- FormsAuthenticationConfiguration.cs
- TextSelectionHighlightLayer.cs
- UnSafeCharBuffer.cs
- DecimalStorage.cs
- ReplyChannelBinder.cs
- DragDrop.cs
- TypeElement.cs
- SafeFileHandle.cs
- QilBinary.cs
- Comparer.cs
- MimeReturn.cs
- WebEncodingValidatorAttribute.cs
- CachedPathData.cs
- InvalidWMPVersionException.cs
- AttachedPropertyBrowsableAttribute.cs
- HTMLTextWriter.cs
- DelegatedStream.cs
- ResourceSet.cs
- InkSerializer.cs
- ClientScriptManager.cs
- ProfileParameter.cs
- TypeUsage.cs
- RayHitTestParameters.cs
- sqlcontext.cs
- RMEnrollmentPage2.cs
- EntityDataSourceDataSelectionPanel.cs
- X500Name.cs
- SqlColumnizer.cs
- KeyManager.cs
- Point3DKeyFrameCollection.cs
- SafeViewOfFileHandle.cs
- Codec.cs
- TailCallAnalyzer.cs
- CreateUserErrorEventArgs.cs
- GridToolTip.cs
- SplitterCancelEvent.cs
- DuplicateWaitObjectException.cs
- XsdCachingReader.cs
- ViewStateChangedEventArgs.cs
- PageAsyncTaskManager.cs
- ContentFilePart.cs
- MdbDataFileEditor.cs
- InstanceHandle.cs
- Transform3D.cs
- OracleBFile.cs
- Vars.cs
- RegisteredScript.cs
- ObjectStateFormatter.cs
- ProfessionalColors.cs
- SchemaHelper.cs
- WindowHideOrCloseTracker.cs
- MeasureData.cs
- WebSysDescriptionAttribute.cs
- Permission.cs
- PixelFormat.cs
- ModuleBuilderData.cs
- ActionFrame.cs
- SafeViewOfFileHandle.cs
- MD5CryptoServiceProvider.cs
- SourceLineInfo.cs
- Literal.cs
- TypeTypeConverter.cs
- _BaseOverlappedAsyncResult.cs
- ControlDesigner.cs