Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SByte.cs
- ApplyHostConfigurationBehavior.cs
- CancellationState.cs
- Rectangle.cs
- LocalBuilder.cs
- PrivacyNoticeBindingElementImporter.cs
- RIPEMD160Managed.cs
- SafeNativeMethods.cs
- EndEvent.cs
- FillErrorEventArgs.cs
- EnvelopedPkcs7.cs
- FormsAuthenticationUser.cs
- PrePrepareMethodAttribute.cs
- TableLayoutCellPaintEventArgs.cs
- PerfCounters.cs
- SharedConnectionWorkflowTransactionService.cs
- VectorAnimationBase.cs
- CancelAsyncOperationRequest.cs
- ExpanderAutomationPeer.cs
- FileChangesMonitor.cs
- WindowsMenu.cs
- DecoderFallbackWithFailureFlag.cs
- OracleRowUpdatingEventArgs.cs
- DataSourceHelper.cs
- ResourceExpression.cs
- ActiveDocumentEvent.cs
- RecordManager.cs
- COMException.cs
- WebPartPersonalization.cs
- XmlWrappingReader.cs
- TextTreeTextElementNode.cs
- DesignSurfaceServiceContainer.cs
- AdPostCacheSubstitution.cs
- XPathMultyIterator.cs
- CryptographicAttribute.cs
- WsiProfilesElementCollection.cs
- MultipleViewPattern.cs
- OutputCacheModule.cs
- Deflater.cs
- StyleBamlRecordReader.cs
- SHA1CryptoServiceProvider.cs
- ValidatingReaderNodeData.cs
- Resources.Designer.cs
- RemotingException.cs
- Regex.cs
- GraphicsPath.cs
- CallContext.cs
- PolicyStatement.cs
- FullTrustAssemblyCollection.cs
- Content.cs
- ArraySegment.cs
- BlobPersonalizationState.cs
- DataServiceHostFactory.cs
- EdmMember.cs
- COM2FontConverter.cs
- FormatException.cs
- hresults.cs
- ToolStripContentPanel.cs
- JsonDataContract.cs
- DropShadowBitmapEffect.cs
- Int32.cs
- DataControlButton.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- ReflectionTypeLoadException.cs
- Dump.cs
- IdnElement.cs
- BitmapDecoder.cs
- StorageFunctionMapping.cs
- SelectorAutomationPeer.cs
- ScriptingSectionGroup.cs
- NameValueFileSectionHandler.cs
- TextParagraphView.cs
- DurableTimerExtension.cs
- ArgumentOutOfRangeException.cs
- XamlBrushSerializer.cs
- DataColumn.cs
- TextOptionsInternal.cs
- MarkupProperty.cs
- XmlName.cs
- DynamicVirtualDiscoSearcher.cs
- UnsafeMethods.cs
- RequestCacheValidator.cs
- XmlElementAttribute.cs
- HwndHostAutomationPeer.cs
- NetworkCredential.cs
- SiteMapDataSourceView.cs
- TemplateBamlRecordReader.cs
- EncryptedKey.cs
- SimpleHandlerBuildProvider.cs
- SchemaType.cs
- WebPartVerb.cs
- CellParagraph.cs
- FormParameter.cs
- XmlCharType.cs
- XmlSerializationGeneratedCode.cs
- ToolStripArrowRenderEventArgs.cs
- Keywords.cs
- CannotUnloadAppDomainException.cs
- FunctionGenerator.cs
- SamlSubject.cs