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
- Lazy.cs
- DateTime.cs
- XsdBuilder.cs
- ExpressionBuilderCollection.cs
- WebPartUtil.cs
- ConfigXmlAttribute.cs
- ArgIterator.cs
- EditorZoneDesigner.cs
- ContextMenuStripGroupCollection.cs
- WarningException.cs
- MatrixConverter.cs
- XmlValidatingReader.cs
- typedescriptorpermissionattribute.cs
- PtsContext.cs
- CodeNamespaceImport.cs
- RuntimeConfigurationRecord.cs
- DocumentViewer.cs
- ScaleTransform.cs
- cache.cs
- Deflater.cs
- login.cs
- PrintPageEvent.cs
- ProfessionalColors.cs
- TextControlDesigner.cs
- TextLineBreak.cs
- _NtlmClient.cs
- sitestring.cs
- UTF7Encoding.cs
- BooleanKeyFrameCollection.cs
- GiveFeedbackEvent.cs
- Compensate.cs
- EntityCollection.cs
- NominalTypeEliminator.cs
- TransformPattern.cs
- AnimationLayer.cs
- SQLDecimalStorage.cs
- StyleXamlTreeBuilder.cs
- NullToBooleanConverter.cs
- SyndicationSerializer.cs
- TypeBrowserDialog.cs
- JpegBitmapDecoder.cs
- TypeLoadException.cs
- OutputCacheSettingsSection.cs
- DotExpr.cs
- ImageKeyConverter.cs
- TraceFilter.cs
- CipherData.cs
- ToolboxBitmapAttribute.cs
- FixedSOMPage.cs
- WebPartTransformer.cs
- MsmqProcessProtocolHandler.cs
- RtfFormatStack.cs
- CanonicalXml.cs
- LineServices.cs
- WindowsFormsHelpers.cs
- initElementDictionary.cs
- SmiEventSink.cs
- SizeAnimation.cs
- CodeSnippetStatement.cs
- CertificateManager.cs
- HandlerMappingMemo.cs
- HttpInputStream.cs
- SafeLocalMemHandle.cs
- Literal.cs
- ColumnWidthChangedEvent.cs
- EpmContentDeSerializer.cs
- InvalidCommandTreeException.cs
- FloaterParagraph.cs
- SqlBooleanizer.cs
- QueryOutputWriter.cs
- RelAssertionDirectKeyIdentifierClause.cs
- xmlsaver.cs
- ObjectDataProvider.cs
- PropagatorResult.cs
- ICollection.cs
- SafeHandles.cs
- ToolStrip.cs
- Soap12ProtocolImporter.cs
- ResourceProviderFactory.cs
- OracleColumn.cs
- CorrelationResolver.cs
- TableStyle.cs
- EntitySetDataBindingList.cs
- PartBasedPackageProperties.cs
- OperationCanceledException.cs
- PauseStoryboard.cs
- metadatamappinghashervisitor.cs
- TableItemPatternIdentifiers.cs
- CancellationTokenSource.cs
- QuaternionIndependentAnimationStorage.cs
- XmlBinaryReader.cs
- PolicyConversionContext.cs
- _IPv4Address.cs
- CustomAttributeBuilder.cs
- GroupStyle.cs
- DataGridColumnEventArgs.cs
- ConfigXmlCDataSection.cs
- CatalogZoneBase.cs
- DesignerObject.cs
- MulticastDelegate.cs