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
- Border.cs
- CallSiteHelpers.cs
- SR.cs
- DeadCharTextComposition.cs
- SiteMapNode.cs
- CodeAttributeArgumentCollection.cs
- ClientScriptManager.cs
- InvalidOleVariantTypeException.cs
- XsltInput.cs
- SafeHandles.cs
- RuleConditionDialog.Designer.cs
- InvalidStoreProtectionKeyException.cs
- ThumbAutomationPeer.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- TabControlEvent.cs
- SystemIPInterfaceStatistics.cs
- MsiStyleLogWriter.cs
- TraceLog.cs
- DependencyObjectProvider.cs
- ValidationErrorCollection.cs
- IBuiltInEvidence.cs
- DrawingAttributes.cs
- BitmapCache.cs
- WorkflowTimerService.cs
- SqlPersonalizationProvider.cs
- CellPartitioner.cs
- EncoderExceptionFallback.cs
- PersonalizableAttribute.cs
- MenuItemBindingCollection.cs
- WindowsToolbarItemAsMenuItem.cs
- HttpRawResponse.cs
- LinqDataSourceStatusEventArgs.cs
- StorageMappingItemLoader.cs
- MediaEntryAttribute.cs
- ProtocolsSection.cs
- HashHelper.cs
- Triplet.cs
- PingOptions.cs
- LinkUtilities.cs
- ClientOptions.cs
- Button.cs
- DesignerSerializerAttribute.cs
- PolicyStatement.cs
- ApplicationInterop.cs
- RowUpdatingEventArgs.cs
- AnnotationService.cs
- Avt.cs
- HandlerFactoryCache.cs
- ThreadInterruptedException.cs
- ThousandthOfEmRealPoints.cs
- CacheRequest.cs
- CodeObjectCreateExpression.cs
- HtmlHead.cs
- ToolboxItemAttribute.cs
- PropertyToken.cs
- CachingParameterInspector.cs
- TimelineCollection.cs
- DataGridViewLinkColumn.cs
- FileChangesMonitor.cs
- MediaContext.cs
- FixedStringLookup.cs
- EntityContainerAssociationSetEnd.cs
- FrameworkEventSource.cs
- DataViewManager.cs
- TabPage.cs
- OdbcTransaction.cs
- XmlSchemaObjectCollection.cs
- SplitterEvent.cs
- InstanceCreationEditor.cs
- Stream.cs
- DataGridViewRowStateChangedEventArgs.cs
- BuildResultCache.cs
- ErrorHandler.cs
- HtmlForm.cs
- ProtocolsConfigurationHandler.cs
- Compress.cs
- ConfigurationElementCollection.cs
- XsltArgumentList.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- MouseEventArgs.cs
- SecurityTraceRecordHelper.cs
- ALinqExpressionVisitor.cs
- BatchServiceHost.cs
- HttpCookieCollection.cs
- DataPagerField.cs
- SymLanguageVendor.cs
- StylusEventArgs.cs
- PrintController.cs
- TreeNodeStyleCollection.cs
- CryptoApi.cs
- XmlTypeMapping.cs
- FontFaceLayoutInfo.cs
- UnaryNode.cs
- StringConverter.cs
- GAC.cs
- WinFormsUtils.cs
- OpenTypeLayoutCache.cs
- PolyQuadraticBezierSegment.cs
- HyperlinkAutomationPeer.cs
- ASCIIEncoding.cs