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
- DeclarativeCatalogPart.cs
- XmlNamedNodeMap.cs
- GenericIdentity.cs
- Application.cs
- SecurityContextSecurityTokenParameters.cs
- FixedSOMTableCell.cs
- WebPartConnectionsConfigureVerb.cs
- StatusBarItemAutomationPeer.cs
- DllHostedComPlusServiceHost.cs
- Models.cs
- InputBuffer.cs
- GeometryDrawing.cs
- EventProvider.cs
- WebPartEventArgs.cs
- ToolTipService.cs
- ExponentialEase.cs
- BuildProviderCollection.cs
- KeyedHashAlgorithm.cs
- StrongTypingException.cs
- ResourceManager.cs
- HttpCookieCollection.cs
- VarRemapper.cs
- BulletedListEventArgs.cs
- KoreanCalendar.cs
- RepeaterItem.cs
- ContainerFilterService.cs
- ToggleButtonAutomationPeer.cs
- DateTimePicker.cs
- ComponentSerializationService.cs
- MultiSelector.cs
- HostSecurityManager.cs
- BindingListCollectionView.cs
- PrivilegedConfigurationManager.cs
- DataGridViewAdvancedBorderStyle.cs
- ComponentResourceKeyConverter.cs
- SuppressMergeCheckAttribute.cs
- BooleanKeyFrameCollection.cs
- ValidationRuleCollection.cs
- AssemblyResourceLoader.cs
- BaseConfigurationRecord.cs
- IIS7WorkerRequest.cs
- TypefaceMap.cs
- MessageRpc.cs
- WindowsGraphicsWrapper.cs
- FreeFormDesigner.cs
- GlyphShapingProperties.cs
- OleDbDataAdapter.cs
- SecurityMode.cs
- remotingproxy.cs
- WeakRefEnumerator.cs
- CodeVariableDeclarationStatement.cs
- PerfCounters.cs
- TokenizerHelper.cs
- Timer.cs
- SystemUnicastIPAddressInformation.cs
- OdbcDataReader.cs
- ColorKeyFrameCollection.cs
- StorageTypeMapping.cs
- ModelItemCollection.cs
- BinaryNode.cs
- DockAndAnchorLayout.cs
- GroupQuery.cs
- DriveInfo.cs
- EntityWithKeyStrategy.cs
- DesignerActionList.cs
- MenuScrollingVisibilityConverter.cs
- Window.cs
- WebBrowsableAttribute.cs
- SiteMapNodeItem.cs
- XmlSecureResolver.cs
- XmlSiteMapProvider.cs
- GraphicsContainer.cs
- ModelTreeEnumerator.cs
- Color.cs
- DbConnectionPoolIdentity.cs
- ReadOnlyDictionary.cs
- EraserBehavior.cs
- PreservationFileWriter.cs
- baseshape.cs
- DropDownButton.cs
- HostingEnvironmentSection.cs
- CatalogZone.cs
- FatalException.cs
- TypeDescriptorContext.cs
- PropertyPathWorker.cs
- CallbackValidator.cs
- ImageDrawing.cs
- CompilerErrorCollection.cs
- HttpCachePolicyElement.cs
- AnimationException.cs
- ScrollChangedEventArgs.cs
- StreamInfo.cs
- Blend.cs
- StoryFragments.cs
- SessionSwitchEventArgs.cs
- IndependentlyAnimatedPropertyMetadata.cs
- DefaultCommandConverter.cs
- SoapBinding.cs
- DocumentPageViewAutomationPeer.cs
- ManagementScope.cs