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
- UserControlParser.cs
- DBCommandBuilder.cs
- ReadOnlyCollectionBase.cs
- SendKeys.cs
- TextDecoration.cs
- SByteConverter.cs
- XamlTypeMapper.cs
- TypeUtils.cs
- FrameworkPropertyMetadata.cs
- PtsPage.cs
- IndexedEnumerable.cs
- AdornerLayer.cs
- SessionStateModule.cs
- UIElement3D.cs
- ScriptRegistrationManager.cs
- BitmapSource.cs
- NodeLabelEditEvent.cs
- PcmConverter.cs
- Empty.cs
- WindowsIdentity.cs
- SmtpNtlmAuthenticationModule.cs
- XsdDateTime.cs
- DataGridViewCellLinkedList.cs
- CornerRadius.cs
- NullableDoubleSumAggregationOperator.cs
- ApplicationBuildProvider.cs
- CaseStatement.cs
- SemanticAnalyzer.cs
- AssemblyUtil.cs
- StringReader.cs
- SerializationSectionGroup.cs
- ServiceModelActivity.cs
- ReferenceEqualityComparer.cs
- TriState.cs
- StopStoryboard.cs
- MailAddress.cs
- XmlQualifiedName.cs
- BlobPersonalizationState.cs
- DurableInstancingOptions.cs
- QilScopedVisitor.cs
- DataShape.cs
- ToolStripPanelRow.cs
- SqlCachedBuffer.cs
- FormClosingEvent.cs
- UmAlQuraCalendar.cs
- KeyInfo.cs
- SqlTypeSystemProvider.cs
- HttpModuleActionCollection.cs
- TypeDescriptionProvider.cs
- XPathExpr.cs
- ReferenceEqualityComparer.cs
- GeneratedCodeAttribute.cs
- WebPartEditorCancelVerb.cs
- Soap.cs
- DataBinding.cs
- ServiceInstanceProvider.cs
- PreservationFileReader.cs
- CriticalHandle.cs
- RectAnimationClockResource.cs
- XmlComment.cs
- ToolboxItemCollection.cs
- DataServiceBuildProvider.cs
- DataServiceSaveChangesEventArgs.cs
- XmlSchemaDatatype.cs
- _CacheStreams.cs
- WebSysDefaultValueAttribute.cs
- XmlDataImplementation.cs
- CheckedPointers.cs
- ToolStripArrowRenderEventArgs.cs
- TransactedReceiveScope.cs
- DiscreteKeyFrames.cs
- RegionIterator.cs
- MobileTemplatedControlDesigner.cs
- ConfigXmlSignificantWhitespace.cs
- SqlErrorCollection.cs
- PageHandlerFactory.cs
- Literal.cs
- WebPartDisplayModeCancelEventArgs.cs
- CqlLexer.cs
- OneWayBindingElementImporter.cs
- FixedSchema.cs
- ServiceModelConfigurationElementCollection.cs
- EntityTemplateUserControl.cs
- DictionaryBase.cs
- X509ChainElement.cs
- MSG.cs
- DbTypeMap.cs
- QilXmlWriter.cs
- Constraint.cs
- InternalDispatchObject.cs
- MDIControlStrip.cs
- BaseDataBoundControlDesigner.cs
- DataServiceProcessingPipeline.cs
- WebBrowserEvent.cs
- DesignerView.Commands.cs
- WindowsSecurityTokenAuthenticator.cs
- SecurityTokenProviderContainer.cs
- CqlLexer.cs
- HMACSHA256.cs
- WorkflowNamespace.cs