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
- AssemblyName.cs
- SmtpTransport.cs
- ObjectViewFactory.cs
- EncodingInfo.cs
- ConfigXmlElement.cs
- CategoryAttribute.cs
- WindowsAuthenticationModule.cs
- SeekStoryboard.cs
- XmlUtil.cs
- HttpApplication.cs
- XmlQualifiedName.cs
- TypeDescriptor.cs
- DeclarativeCatalogPart.cs
- ClientBuildManager.cs
- AliasedSlot.cs
- PeerNearMe.cs
- NonBatchDirectoryCompiler.cs
- Misc.cs
- FixedDSBuilder.cs
- SapiRecognizer.cs
- SQLResource.cs
- ExtractorMetadata.cs
- WizardStepBase.cs
- MetafileHeaderWmf.cs
- XPathConvert.cs
- TraceInternal.cs
- ArgIterator.cs
- Listen.cs
- EventLogEntry.cs
- XmlSchemaComplexType.cs
- MaskedTextProvider.cs
- SymLanguageType.cs
- TableRowGroup.cs
- StreamGeometry.cs
- RemotingConfigParser.cs
- GeneratedView.cs
- ApplicationSettingsBase.cs
- DataGridRowDetailsEventArgs.cs
- CodeDomSerializerBase.cs
- BitmapEffectGeneralTransform.cs
- ComponentSerializationService.cs
- PrintPageEvent.cs
- ZoneLinkButton.cs
- Mapping.cs
- TraceLog.cs
- LocalClientSecuritySettings.cs
- DelegateCompletionCallbackWrapper.cs
- HitTestDrawingContextWalker.cs
- Triangle.cs
- WebMethodAttribute.cs
- ObjectParameter.cs
- xmlglyphRunInfo.cs
- XmlQueryType.cs
- PublisherMembershipCondition.cs
- SpeechUI.cs
- InlineObject.cs
- QuaternionAnimationBase.cs
- ProtocolsSection.cs
- GridViewDeletedEventArgs.cs
- XmlExceptionHelper.cs
- CodeDomSerializerException.cs
- CmsInterop.cs
- ComponentSerializationService.cs
- WmpBitmapDecoder.cs
- __FastResourceComparer.cs
- EventLogPermissionHolder.cs
- X509PeerCertificateAuthentication.cs
- ButtonFieldBase.cs
- FormViewInsertedEventArgs.cs
- Source.cs
- ThreadStaticAttribute.cs
- MediaElementAutomationPeer.cs
- HelloMessage11.cs
- LineServicesCallbacks.cs
- ClassDataContract.cs
- XPathBinder.cs
- SessionStateModule.cs
- RawStylusInputReport.cs
- OdbcConnectionOpen.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Activity.cs
- PtsPage.cs
- GridSplitterAutomationPeer.cs
- RuntimeHelpers.cs
- PageBuildProvider.cs
- Exceptions.cs
- HwndHostAutomationPeer.cs
- ListBox.cs
- ModelItemKeyValuePair.cs
- IndexerReference.cs
- ToolStripProgressBar.cs
- DataGridViewUtilities.cs
- BuilderInfo.cs
- CalendarAutomationPeer.cs
- XmlnsCache.cs
- SecurityCapabilities.cs
- WindowsServiceElement.cs
- ControlTemplate.cs
- Tool.cs
- DbParameterCollection.cs