Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / HTTPNotFoundHandler.cs / 1 / HTTPNotFoundHandler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * Synchronous Http request handler interface * * Copyright (c) 1998 Microsoft Corporation */ namespace System.Web { ////// internal class HttpNotFoundHandler : IHttpHandler { internal HttpNotFoundHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { PerfCounters.IncrementCounter(AppPerfCounter.REQUESTS_NOT_FOUND); throw new HttpException(404, SR.GetString(SR.Path_not_found, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } internal class HttpForbiddenHandler : IHttpHandler { internal HttpForbiddenHandler() { } ///Indicates whether an HttpNotFoundHandler instance can be recycled and used /// for another request. ////// public void ProcessRequest(HttpContext context) { PerfCounters.IncrementCounter(AppPerfCounter.REQUESTS_NOT_FOUND); throw new HttpException(403, SR.GetString(SR.Path_forbidden, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } ///Indicates whether an HttpForbiddenHandler instance can be recycled and used /// for another request. ////// internal class HttpMethodNotAllowedHandler : IHttpHandler { internal HttpMethodNotAllowedHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { throw new HttpException(405, SR.GetString(SR.Path_forbidden, context.Request.HttpMethod)); } ///Drives /// web processing execution. ////// public bool IsReusable { get { return true; } } } ///Indicates whether an HttpForbiddenHandler instance can be recycled and used /// for another request. ////// internal class HttpNotImplementedHandler : IHttpHandler { internal HttpNotImplementedHandler() { } ///Provides a synchronous Http request handler interface. ////// public void ProcessRequest(HttpContext context) { throw new HttpException(501, SR.GetString(SR.Method_for_path_not_implemented, context.Request.HttpMethod, context.Request.Path)); } ///Drives web processing execution. ////// public bool IsReusable { get { return true; } } } }Indicates whether an HttpNotImplementedHandler instance can be recycled and /// used for another request. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationAttributes.cs
- HasCopySemanticsAttribute.cs
- ExpressionBindingCollection.cs
- PrimitiveSchema.cs
- StatusCommandUI.cs
- PhoneCall.cs
- QilCloneVisitor.cs
- UpdateCompiler.cs
- DetailsViewModeEventArgs.cs
- SmtpFailedRecipientsException.cs
- ContextActivityUtils.cs
- DataColumnMappingCollection.cs
- WebPartDisplayMode.cs
- WebServiceData.cs
- DictionaryMarkupSerializer.cs
- SystemUdpStatistics.cs
- FixedSOMTable.cs
- BindingExpressionUncommonField.cs
- WebConfigurationFileMap.cs
- TextViewBase.cs
- SystemResources.cs
- CharConverter.cs
- TextRange.cs
- UnknownBitmapDecoder.cs
- MatrixKeyFrameCollection.cs
- EntityParameterCollection.cs
- DesigntimeLicenseContext.cs
- ErrorFormatterPage.cs
- RedBlackList.cs
- SystemColors.cs
- TransformationRules.cs
- DataViewManager.cs
- Bits.cs
- ValueTable.cs
- DeobfuscatingStream.cs
- ThumbButtonInfo.cs
- UrlMapping.cs
- JsonServiceDocumentSerializer.cs
- Ipv6Element.cs
- MimeBasePart.cs
- HideDisabledControlAdapter.cs
- EpmSourceTree.cs
- SystemKeyConverter.cs
- ElementsClipboardData.cs
- HostedElements.cs
- Line.cs
- Funcletizer.cs
- AssemblyName.cs
- TCEAdapterGenerator.cs
- BuildManagerHost.cs
- DataServiceException.cs
- UIElementIsland.cs
- EventWaitHandle.cs
- Span.cs
- PenContext.cs
- HtmlInputControl.cs
- OperationCanceledException.cs
- DataColumnPropertyDescriptor.cs
- SiteMapProvider.cs
- LinearGradientBrush.cs
- FilterableData.cs
- WebPartActionVerb.cs
- XmlNodeChangedEventArgs.cs
- DataRowCollection.cs
- ResourceSetExpression.cs
- AutomationPatternInfo.cs
- XmlTextEncoder.cs
- ZoneButton.cs
- VariableQuery.cs
- XPathDocumentNavigator.cs
- WebBrowserHelper.cs
- And.cs
- ArrayWithOffset.cs
- EntityCodeGenerator.cs
- CheckBox.cs
- SecurityDescriptor.cs
- PointConverter.cs
- DataGridColumnHeaderAutomationPeer.cs
- URI.cs
- PointIndependentAnimationStorage.cs
- ProvidersHelper.cs
- CompilerHelpers.cs
- EntityClassGenerator.cs
- ToolBarPanel.cs
- CellParagraph.cs
- SecurityStateEncoder.cs
- InitialServerConnectionReader.cs
- CommonXSendMessage.cs
- TextSearch.cs
- IDReferencePropertyAttribute.cs
- ObfuscateAssemblyAttribute.cs
- PropertyRef.cs
- TextParagraphView.cs
- JoinCqlBlock.cs
- StyleXamlTreeBuilder.cs
- OracleBinary.cs
- DataGridViewMethods.cs
- EmptyReadOnlyDictionaryInternal.cs
- DecimalStorage.cs
- SqlInfoMessageEvent.cs