Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MatchingStyle.cs
- COM2ColorConverter.cs
- HttpRuntimeSection.cs
- StringFreezingAttribute.cs
- HttpCachePolicyElement.cs
- WindowVisualStateTracker.cs
- PersistenceException.cs
- NonVisualControlAttribute.cs
- RoleGroup.cs
- EntityDataSourceDataSelection.cs
- COM2IPerPropertyBrowsingHandler.cs
- WebPartEditorCancelVerb.cs
- QilExpression.cs
- HttpResponse.cs
- ShapingWorkspace.cs
- HostedTransportConfigurationManager.cs
- ISFTagAndGuidCache.cs
- FileDataSourceCache.cs
- IntSecurity.cs
- AssemblyCache.cs
- QuaternionAnimationBase.cs
- ToolStripItemTextRenderEventArgs.cs
- AdPostCacheSubstitution.cs
- StringSource.cs
- WindowsImpersonationContext.cs
- DBSchemaRow.cs
- InteropExecutor.cs
- CharEntityEncoderFallback.cs
- FtpWebResponse.cs
- Column.cs
- PageFunction.cs
- RequestCachePolicy.cs
- WebPartCloseVerb.cs
- EventLogTraceListener.cs
- SqlConnectionHelper.cs
- UrlPath.cs
- UserPersonalizationStateInfo.cs
- ProjectionCamera.cs
- CopyAction.cs
- ClientRoleProvider.cs
- ConditionalWeakTable.cs
- EntitySqlException.cs
- TreeView.cs
- PartManifestEntry.cs
- ColumnTypeConverter.cs
- XComponentModel.cs
- CodeSnippetCompileUnit.cs
- EditCommandColumn.cs
- BufferedGraphics.cs
- InstanceDataCollectionCollection.cs
- MonitorWrapper.cs
- HtmlProps.cs
- MaterialGroup.cs
- SubtreeProcessor.cs
- StyleSelector.cs
- TextTreeFixupNode.cs
- WindowsGrip.cs
- ExclusiveNamedPipeTransportManager.cs
- WebResourceUtil.cs
- Lasso.cs
- Int32Storage.cs
- HandledEventArgs.cs
- State.cs
- SecurityUniqueId.cs
- SqlInfoMessageEvent.cs
- OlePropertyStructs.cs
- SerializerProvider.cs
- ProxyHwnd.cs
- Item.cs
- ManagedFilter.cs
- XmlDocumentSerializer.cs
- LongTypeConverter.cs
- Base64Decoder.cs
- CapabilitiesAssignment.cs
- MSAAEventDispatcher.cs
- PositiveTimeSpanValidatorAttribute.cs
- Int32KeyFrameCollection.cs
- RowType.cs
- BuildResult.cs
- GeneralTransform.cs
- RuntimeHelpers.cs
- FormClosedEvent.cs
- KeyedHashAlgorithm.cs
- AuthenticationModuleElement.cs
- WindowsContainer.cs
- UndirectedGraph.cs
- FtpWebRequest.cs
- QueryableDataSource.cs
- BamlRecordWriter.cs
- embossbitmapeffect.cs
- XmlSchemaComplexType.cs
- FullTrustAssembly.cs
- XmlSchemaSet.cs
- HttpHandlerActionCollection.cs
- HttpListenerTimeoutManager.cs
- PageCodeDomTreeGenerator.cs
- XmlBaseReader.cs
- MessageBox.cs
- ImmutableObjectAttribute.cs
- DataGridViewRowConverter.cs