Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } } } // 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
- ReplacementText.cs
- SafeNativeMethodsMilCoreApi.cs
- CompositionAdorner.cs
- SafeNativeMethods.cs
- DependencyPropertyChangedEventArgs.cs
- IERequestCache.cs
- SqlErrorCollection.cs
- EntityContainerAssociationSetEnd.cs
- ContentPresenter.cs
- TableHeaderCell.cs
- EventItfInfo.cs
- EntityCollection.cs
- SchemaManager.cs
- CounterCreationDataCollection.cs
- WebPartTransformer.cs
- FileDialogCustomPlacesCollection.cs
- IPPacketInformation.cs
- DataContractAttribute.cs
- WindowsStartMenu.cs
- ValuePattern.cs
- PrivilegedConfigurationManager.cs
- StrokeCollectionConverter.cs
- PartitionResolver.cs
- SqlDataSourceCache.cs
- BufferedReceiveElement.cs
- ProfilePropertySettings.cs
- TreeNodeBindingCollection.cs
- HashSet.cs
- ReturnValue.cs
- RowVisual.cs
- _SpnDictionary.cs
- SiteIdentityPermission.cs
- SplitContainer.cs
- wgx_render.cs
- fixedPageContentExtractor.cs
- ScrollBar.cs
- HttpRequest.cs
- PointIndependentAnimationStorage.cs
- CancelEventArgs.cs
- ErrorHandler.cs
- ErrorProvider.cs
- ExpandSegment.cs
- EntityDataSourceContextCreatedEventArgs.cs
- TextTreeRootNode.cs
- DeploymentSection.cs
- PipeStream.cs
- SqlCacheDependency.cs
- XmlWrappingReader.cs
- ShaderEffect.cs
- EntityUtil.cs
- PrimitiveXmlSerializers.cs
- Rect3DValueSerializer.cs
- PropertyInfoSet.cs
- StrokeNodeData.cs
- PermissionListSet.cs
- WebPartRestoreVerb.cs
- ConfigurationPropertyAttribute.cs
- COM2AboutBoxPropertyDescriptor.cs
- RightsManagementProvider.cs
- DataBoundControlAdapter.cs
- OutputWindow.cs
- ResXBuildProvider.cs
- OrderedDictionaryStateHelper.cs
- CryptoHelper.cs
- X509KeyIdentifierClauseType.cs
- ListBoxItem.cs
- BooleanSwitch.cs
- TemplateKeyConverter.cs
- TransformConverter.cs
- Codec.cs
- DodSequenceMerge.cs
- FormViewUpdateEventArgs.cs
- ObjectDataSourceStatusEventArgs.cs
- EdmFunction.cs
- Scripts.cs
- HealthMonitoringSection.cs
- BreakRecordTable.cs
- SqlDataSourceStatusEventArgs.cs
- ConnectionManagementSection.cs
- ExpressionBuilder.cs
- DateTimeOffsetStorage.cs
- XmlnsDefinitionAttribute.cs
- ToolStripItem.cs
- IncomingWebResponseContext.cs
- TextContainerChangeEventArgs.cs
- SourceElementsCollection.cs
- HandlerBase.cs
- RenderData.cs
- OpenTypeLayoutCache.cs
- SelectingProviderEventArgs.cs
- PageBuildProvider.cs
- SafeRegistryHandle.cs
- SectionVisual.cs
- HMACMD5.cs
- AbsoluteQuery.cs
- CompilationUnit.cs
- ActivationWorker.cs
- ProjectionPlan.cs
- Rect.cs
- InputProviderSite.cs