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
- WsatServiceCertificate.cs
- Attributes.cs
- EntityDataSourceMemberPath.cs
- SoapConverter.cs
- DataGridViewSortCompareEventArgs.cs
- SimpleWorkerRequest.cs
- NCryptNative.cs
- RNGCryptoServiceProvider.cs
- LineBreakRecord.cs
- FontInfo.cs
- CaseKeyBox.xaml.cs
- SafeRightsManagementQueryHandle.cs
- TableLayoutPanel.cs
- ConfigurationSettings.cs
- AtlasWeb.Designer.cs
- DiscoveryDocument.cs
- DataColumnChangeEvent.cs
- ToolStripGripRenderEventArgs.cs
- SimpleFieldTemplateFactory.cs
- XPathQueryGenerator.cs
- SecurityImpersonationBehavior.cs
- SqlException.cs
- CompiledQueryCacheKey.cs
- TableLayoutPanel.cs
- CodeComment.cs
- BinaryUtilClasses.cs
- GradientBrush.cs
- StickyNote.cs
- RegexCaptureCollection.cs
- TimeSpan.cs
- EmptyEnumerable.cs
- SQLRoleProvider.cs
- InternalPermissions.cs
- TreeIterator.cs
- ObjectListField.cs
- EntityDescriptor.cs
- DataBinder.cs
- TripleDESCryptoServiceProvider.cs
- ControlCodeDomSerializer.cs
- IISUnsafeMethods.cs
- Model3DCollection.cs
- HttpRuntime.cs
- RowsCopiedEventArgs.cs
- RowToFieldTransformer.cs
- PeerUnsafeNativeMethods.cs
- MarshalByRefObject.cs
- Size.cs
- TabControlAutomationPeer.cs
- ObjectConverter.cs
- ImageSource.cs
- OLEDB_Util.cs
- DataRelationCollection.cs
- MethodBuilderInstantiation.cs
- DataGridItemCollection.cs
- Form.cs
- dataprotectionpermissionattribute.cs
- Privilege.cs
- EventLogInformation.cs
- MediaElement.cs
- UnmanagedHandle.cs
- GridToolTip.cs
- _HelperAsyncResults.cs
- KnownBoxes.cs
- GatewayDefinition.cs
- XmlDocumentType.cs
- InputProviderSite.cs
- UnionCodeGroup.cs
- SynchronousChannelMergeEnumerator.cs
- TheQuery.cs
- FieldNameLookup.cs
- EntityDataSourceEntityTypeFilterItem.cs
- CompilerWrapper.cs
- ProfessionalColorTable.cs
- LZCodec.cs
- StructuredType.cs
- ConstructorExpr.cs
- ToolStripRendererSwitcher.cs
- DataRowView.cs
- SelectedPathEditor.cs
- DataServiceException.cs
- Viewport3DVisual.cs
- CompilationLock.cs
- TypeConverterHelper.cs
- WindowsSysHeader.cs
- SoapSchemaMember.cs
- SmiGettersStream.cs
- FastEncoder.cs
- HostingMessageProperty.cs
- NativeMethods.cs
- InvokeProviderWrapper.cs
- BoundsDrawingContextWalker.cs
- SemanticTag.cs
- WebPartMinimizeVerb.cs
- DbCommandDefinition.cs
- LongTypeConverter.cs
- Executor.cs
- ReachDocumentReferenceSerializer.cs
- UpdateCompiler.cs
- DataGridViewComboBoxColumn.cs
- Material.cs