Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / HTTPNotFoundHandler.cs / 1305376 / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.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
- PackWebRequestFactory.cs
- RenderingBiasValidation.cs
- AlignmentXValidation.cs
- DesignObjectWrapper.cs
- TypedRowHandler.cs
- WorkflowOperationBehavior.cs
- DbgCompiler.cs
- ListViewCancelEventArgs.cs
- InputProcessorProfiles.cs
- Menu.cs
- DataSourceControl.cs
- X509CertificateEndpointIdentity.cs
- ExpandedWrapper.cs
- InstanceDataCollectionCollection.cs
- MembershipUser.cs
- SelectManyQueryOperator.cs
- WebPartConnectionsConfigureVerb.cs
- RoleService.cs
- ConnectionPoolManager.cs
- ClientOperationFormatterProvider.cs
- CalendarDay.cs
- ProgressBarBrushConverter.cs
- DocumentSequenceHighlightLayer.cs
- EasingKeyFrames.cs
- ChildrenQuery.cs
- WmlLinkAdapter.cs
- cache.cs
- QualifierSet.cs
- AttachedPropertyBrowsableAttribute.cs
- Logging.cs
- StyleBamlRecordReader.cs
- XpsViewerException.cs
- ReadOnlyDataSource.cs
- CompareInfo.cs
- Authorization.cs
- HttpApplicationStateBase.cs
- MatrixTransform.cs
- SelectionChangedEventArgs.cs
- EventArgs.cs
- EnumBuilder.cs
- ListView.cs
- TypeTypeConverter.cs
- BamlLocalizer.cs
- XmlArrayAttribute.cs
- TreeNodeStyle.cs
- SafeCoTaskMem.cs
- JsonByteArrayDataContract.cs
- OpacityConverter.cs
- XmlQueryRuntime.cs
- TreeViewImageGenerator.cs
- ResponseStream.cs
- PerformanceCountersElement.cs
- EntityDataSourceStatementEditor.cs
- DbProviderFactoriesConfigurationHandler.cs
- FormViewUpdatedEventArgs.cs
- AnnotationObservableCollection.cs
- DataGridColumnCollection.cs
- BrowserTree.cs
- CachedPathData.cs
- FixedSOMElement.cs
- SerTrace.cs
- Decorator.cs
- DataGridViewBand.cs
- DataRowExtensions.cs
- WeakReadOnlyCollection.cs
- SoapAttributes.cs
- CancellationScope.cs
- OleDbEnumerator.cs
- CommandID.cs
- DesignerWebPartChrome.cs
- Vector3DAnimation.cs
- GridProviderWrapper.cs
- FlatButtonAppearance.cs
- EpmCustomContentDeSerializer.cs
- SqlCommandBuilder.cs
- CorrelationManager.cs
- XmlAttributeHolder.cs
- WindowsTreeView.cs
- HierarchicalDataSourceControl.cs
- RuleAction.cs
- ColumnMapVisitor.cs
- _Connection.cs
- ShaderEffect.cs
- WindowsMenu.cs
- ActiveXContainer.cs
- BevelBitmapEffect.cs
- HttpProfileBase.cs
- HandleRef.cs
- DataGridDetailsPresenterAutomationPeer.cs
- Symbol.cs
- QilValidationVisitor.cs
- ApplicationDirectory.cs
- PositiveTimeSpanValidator.cs
- StrokeCollection2.cs
- Window.cs
- TrustManager.cs
- unsafeIndexingFilterStream.cs
- __Filters.cs
- AdobeCFFWrapper.cs
- QueryMath.cs