Code:
/ 4.0 / 4.0 / 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. ///// 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
- SplitterEvent.cs
- ApplicationId.cs
- XmlNamespaceMappingCollection.cs
- SmiContext.cs
- ToolStripDropDownClosedEventArgs.cs
- AstNode.cs
- TypedRowHandler.cs
- IsolationInterop.cs
- SqlMethodCallConverter.cs
- ToolStripRenderEventArgs.cs
- DataAdapter.cs
- TemplatedAdorner.cs
- ServiceHostingEnvironmentSection.cs
- GPRECT.cs
- Pool.cs
- UriScheme.cs
- RelatedPropertyManager.cs
- WsdlInspector.cs
- ImageFormatConverter.cs
- SmiTypedGetterSetter.cs
- CFStream.cs
- RequestContext.cs
- TemplateControl.cs
- DataViewManagerListItemTypeDescriptor.cs
- ManipulationVelocities.cs
- ResourceDisplayNameAttribute.cs
- XmlTextReader.cs
- ForceCopyBuildProvider.cs
- IPPacketInformation.cs
- DynamicDocumentPaginator.cs
- NotifyParentPropertyAttribute.cs
- XmlTextEncoder.cs
- FixedSOMTableRow.cs
- SchemaImporter.cs
- XmlSchemaSimpleContent.cs
- XsdDataContractImporter.cs
- BindingParameterCollection.cs
- GroupBoxAutomationPeer.cs
- X509PeerCertificateElement.cs
- CacheDependency.cs
- DmlSqlGenerator.cs
- StyleXamlParser.cs
- EncoderExceptionFallback.cs
- SequentialWorkflowRootDesigner.cs
- BCryptHashAlgorithm.cs
- BoundField.cs
- TabletDeviceInfo.cs
- SoapIncludeAttribute.cs
- BinaryCommonClasses.cs
- dataprotectionpermission.cs
- ProxyGenerationError.cs
- Metafile.cs
- SmiContext.cs
- ObjectHandle.cs
- RemoteWebConfigurationHost.cs
- SqlClientPermission.cs
- CommandBindingCollection.cs
- ParameterEditorUserControl.cs
- IList.cs
- WindowsListViewScroll.cs
- HandlerFactoryCache.cs
- CommentEmitter.cs
- MasterPage.cs
- NotificationContext.cs
- ErrorHandler.cs
- HttpHandler.cs
- NotImplementedException.cs
- SamlAuthorizationDecisionStatement.cs
- FindCriteria11.cs
- ObjectDataSource.cs
- ResponseBodyWriter.cs
- DBNull.cs
- Semaphore.cs
- HitTestResult.cs
- NullableIntMinMaxAggregationOperator.cs
- Brush.cs
- PageTheme.cs
- SegmentInfo.cs
- RuntimeArgumentHandle.cs
- TransportDefaults.cs
- ConnectionStringsExpressionBuilder.cs
- ProxyWebPartConnectionCollection.cs
- ActivityContext.cs
- SafeLocalAllocation.cs
- DelimitedListTraceListener.cs
- IndexOutOfRangeException.cs
- CompressEmulationStream.cs
- PrefixQName.cs
- SoapProtocolImporter.cs
- DelayedRegex.cs
- HexParser.cs
- ComponentManagerBroker.cs
- ToolStripButton.cs
- ReadOnlyCollectionBase.cs
- Oci.cs
- FastPropertyAccessor.cs
- RecognizerInfo.cs
- PenThreadWorker.cs
- Attributes.cs
- ClassGenerator.cs