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
- ResourceDisplayNameAttribute.cs
- IIS7UserPrincipal.cs
- Region.cs
- AutomationFocusChangedEventArgs.cs
- ExpressionVisitorHelpers.cs
- VersionedStreamOwner.cs
- FormatPage.cs
- TableDetailsRow.cs
- TypeUsageBuilder.cs
- CatalogZoneAutoFormat.cs
- PtsCache.cs
- WebPartEditorApplyVerb.cs
- SoapSchemaMember.cs
- TextTreeRootTextBlock.cs
- FieldToken.cs
- ToolStripTextBox.cs
- MemberRelationshipService.cs
- GeneratedCodeAttribute.cs
- OutOfMemoryException.cs
- TracingConnectionListener.cs
- CornerRadius.cs
- CalendarAutomationPeer.cs
- FileReservationCollection.cs
- TraversalRequest.cs
- InvalidOleVariantTypeException.cs
- HttpCookiesSection.cs
- EdmSchemaAttribute.cs
- GraphicsContainer.cs
- ItemAutomationPeer.cs
- QueryExpr.cs
- FormViewPageEventArgs.cs
- basemetadatamappingvisitor.cs
- lengthconverter.cs
- TypeSource.cs
- JavaScriptString.cs
- PrePrepareMethodAttribute.cs
- DataGridViewIntLinkedList.cs
- ConfigurationLocationCollection.cs
- AnnotationObservableCollection.cs
- XamlFilter.cs
- SafeFileMappingHandle.cs
- SolidColorBrush.cs
- xmlsaver.cs
- KeyGestureConverter.cs
- FormatException.cs
- WindowsEditBoxRange.cs
- Stopwatch.cs
- COAUTHIDENTITY.cs
- DocumentApplication.cs
- XmlAttributeOverrides.cs
- QueryContinueDragEvent.cs
- FlagsAttribute.cs
- TypedCompletedAsyncResult.cs
- WizardStepBase.cs
- ControlBindingsCollection.cs
- InputScopeManager.cs
- WmlImageAdapter.cs
- ConfigurationManagerHelper.cs
- MultiView.cs
- DataSourceExpressionCollection.cs
- ExpressionLexer.cs
- X509Certificate2Collection.cs
- ViewCellRelation.cs
- DataListComponentEditor.cs
- HtmlLink.cs
- GeometryModel3D.cs
- SiteMapNodeItem.cs
- TryCatchDesigner.xaml.cs
- StylusOverProperty.cs
- XmlDocumentFieldSchema.cs
- TraceData.cs
- CombinedTcpChannel.cs
- WebPartAuthorizationEventArgs.cs
- RemotingServices.cs
- WebPartConnectionCollection.cs
- EFTableProvider.cs
- ColumnMapVisitor.cs
- BinaryCommonClasses.cs
- SqlUserDefinedTypeAttribute.cs
- XamlPathDataSerializer.cs
- CacheChildrenQuery.cs
- ApplicationException.cs
- MultiView.cs
- Tracking.cs
- DesignDataSource.cs
- Matrix.cs
- SerializationInfoEnumerator.cs
- TemplateKeyConverter.cs
- OLEDB_Util.cs
- Rect.cs
- PropertyChangingEventArgs.cs
- XNodeNavigator.cs
- datacache.cs
- DataObjectAttribute.cs
- ScrollBar.cs
- Debug.cs
- CacheChildrenQuery.cs
- XmlAttributeCollection.cs
- Stroke2.cs
- ElementUtil.cs