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
- StylusOverProperty.cs
- InstanceHandle.cs
- SqlUserDefinedAggregateAttribute.cs
- DomNameTable.cs
- PrintDialogException.cs
- DeferredRunTextReference.cs
- HwndMouseInputProvider.cs
- HttpConfigurationSystem.cs
- _HeaderInfo.cs
- FileLevelControlBuilderAttribute.cs
- PrintPreviewGraphics.cs
- RuntimeVariablesExpression.cs
- CultureTableRecord.cs
- EntitySqlQueryState.cs
- CodeDOMUtility.cs
- LinqDataSourceView.cs
- XmlSchemaAttribute.cs
- StrongTypingException.cs
- Queue.cs
- RegexMatchCollection.cs
- TimelineCollection.cs
- AppDomainManager.cs
- messageonlyhwndwrapper.cs
- DataSvcMapFileSerializer.cs
- HitTestWithGeometryDrawingContextWalker.cs
- Int16AnimationUsingKeyFrames.cs
- XmlSchemaValidationException.cs
- SqlProviderUtilities.cs
- SQLInt32.cs
- SqlDataSourceView.cs
- TextServicesDisplayAttributePropertyRanges.cs
- DefaultClaimSet.cs
- ReferenceService.cs
- ActivityXRefPropertyEditor.cs
- RadioButtonRenderer.cs
- EmptyControlCollection.cs
- XmlSchemaCollection.cs
- LazyLoadBehavior.cs
- XmlTextReader.cs
- ProfileService.cs
- Evaluator.cs
- ProfilePropertyMetadata.cs
- AnnouncementInnerClientCD1.cs
- HMACSHA512.cs
- SqlDataSourceFilteringEventArgs.cs
- PermissionToken.cs
- ToolStripItemEventArgs.cs
- MetadataArtifactLoaderCompositeFile.cs
- Soap.cs
- FontDifferentiator.cs
- SqlException.cs
- CompositeDataBoundControl.cs
- ApplicationInfo.cs
- ConfigXmlSignificantWhitespace.cs
- AtomContentProperty.cs
- StorageAssociationTypeMapping.cs
- MobileControlsSectionHelper.cs
- HttpCapabilitiesBase.cs
- NameValueCollection.cs
- WinInet.cs
- TextRange.cs
- BindingGroup.cs
- TypeBuilderInstantiation.cs
- CopyNamespacesAction.cs
- WebPartMinimizeVerb.cs
- AddInDeploymentState.cs
- TrackingRecord.cs
- CompilationUnit.cs
- CssClassPropertyAttribute.cs
- _ConnectionGroup.cs
- ToolboxItemWrapper.cs
- ExpressionEvaluator.cs
- BindingContext.cs
- SoapCodeExporter.cs
- SequenceRangeCollection.cs
- ProtocolElement.cs
- SplineKeyFrames.cs
- VectorCollectionConverter.cs
- NavigatorOutput.cs
- GeometryHitTestParameters.cs
- ImageAutomationPeer.cs
- PackageRelationship.cs
- InstanceKey.cs
- TableSectionStyle.cs
- SecurityResources.cs
- SecurityTokenTypes.cs
- TraceProvider.cs
- DocumentEventArgs.cs
- CultureTableRecord.cs
- DataSet.cs
- UIElementHelper.cs
- designeractionlistschangedeventargs.cs
- DivideByZeroException.cs
- DbBuffer.cs
- Constraint.cs
- PngBitmapEncoder.cs
- ReverseComparer.cs
- ExeContext.cs
- DiscreteKeyFrames.cs
- BitmapSourceSafeMILHandle.cs