Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / Configuration / UrlAuthFailedErrorFormatter.cs / 3 / 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 {
//
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.
//------------------------------------------------------------------------------
//
// 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 {
//
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DBSqlParserTableCollection.cs
- TransactionManager.cs
- DynamicILGenerator.cs
- XPathExpr.cs
- TreeNodeStyle.cs
- GCHandleCookieTable.cs
- TagMapInfo.cs
- EventManager.cs
- XmlElementAttribute.cs
- ApplicationDirectory.cs
- AppDomain.cs
- ProcessHostServerConfig.cs
- ActivityCompletionCallbackWrapper.cs
- UnknownBitmapDecoder.cs
- CompiledXpathExpr.cs
- FileUtil.cs
- ExecutionContext.cs
- XmlSchemaAttribute.cs
- ElasticEase.cs
- GZipDecoder.cs
- OracleCommand.cs
- EdmItemCollection.cs
- HwndSourceKeyboardInputSite.cs
- InstanceData.cs
- SmtpClient.cs
- FrameworkElement.cs
- PkcsUtils.cs
- Char.cs
- DateTimeUtil.cs
- ElementAction.cs
- InternalTypeHelper.cs
- FrameworkContentElement.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- XPathMultyIterator.cs
- HttpCookie.cs
- _NativeSSPI.cs
- Stopwatch.cs
- QuaternionRotation3D.cs
- ListViewGroup.cs
- WorkflowInstanceContextProvider.cs
- PageCodeDomTreeGenerator.cs
- OracleRowUpdatedEventArgs.cs
- FixedElement.cs
- FontDifferentiator.cs
- AstTree.cs
- SetStoryboardSpeedRatio.cs
- HttpListener.cs
- ConfigurationException.cs
- MutexSecurity.cs
- FreezableDefaultValueFactory.cs
- SubMenuStyleCollection.cs
- ToolStripRenderer.cs
- ReachDocumentReferenceSerializerAsync.cs
- TransformGroup.cs
- CommentEmitter.cs
- WindowsAuthenticationModule.cs
- BitStack.cs
- RewritingProcessor.cs
- StyleHelper.cs
- DbConnectionPoolGroup.cs
- XPathSelectionIterator.cs
- XmlImplementation.cs
- ReferentialConstraint.cs
- TextTrailingCharacterEllipsis.cs
- Propagator.cs
- List.cs
- ErrorRuntimeConfig.cs
- EllipseGeometry.cs
- ContentPosition.cs
- ManagementException.cs
- EventMappingSettings.cs
- ByteStack.cs
- QuotedPrintableStream.cs
- InvalidDataException.cs
- ToolTip.cs
- KeyEvent.cs
- Int32Animation.cs
- XamlInt32CollectionSerializer.cs
- WebUtil.cs
- EventEntry.cs
- DefaultExpressionVisitor.cs
- InputLanguageSource.cs
- ChangePassword.cs
- PointLight.cs
- PkcsUtils.cs
- EmptyEnumerator.cs
- listitem.cs
- FontWeightConverter.cs
- SamlSubjectStatement.cs
- EntityException.cs
- CompilationUnit.cs
- RemoteWebConfigurationHostServer.cs
- ObjectDesignerDataSourceView.cs
- Label.cs
- ChangeTracker.cs
- ContractCodeDomInfo.cs
- ProtectedConfiguration.cs
- InputScope.cs
- SecurityAlgorithmSuiteConverter.cs
- JsonByteArrayDataContract.cs