Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }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
- TransportBindingElementImporter.cs
- ServicePrincipalNameElement.cs
- Quack.cs
- GenericEnumConverter.cs
- CryptoStream.cs
- GZipStream.cs
- ActivityUtilities.cs
- Accessors.cs
- XD.cs
- ReceiveParametersContent.cs
- WebPartDisplayModeCollection.cs
- EvidenceTypeDescriptor.cs
- CustomTypeDescriptor.cs
- XmlNamespaceManager.cs
- ModelPerspective.cs
- NameTable.cs
- exports.cs
- SqlNode.cs
- SmiEventSink_Default.cs
- WebServicesSection.cs
- SimpleTextLine.cs
- ISAPIWorkerRequest.cs
- ActivityExecutor.cs
- TableCell.cs
- AffineTransform3D.cs
- UnmanagedMemoryStreamWrapper.cs
- DummyDataSource.cs
- DeploymentSection.cs
- IfJoinedCondition.cs
- PrintingPermission.cs
- StrongNameUtility.cs
- CompoundFileStreamReference.cs
- ValueUtilsSmi.cs
- PositiveTimeSpanValidatorAttribute.cs
- AuthenticationManager.cs
- DetailsViewPagerRow.cs
- PrePrepareMethodAttribute.cs
- DocumentViewerAutomationPeer.cs
- XPathDocumentIterator.cs
- DodSequenceMerge.cs
- wgx_commands.cs
- ImmutableAssemblyCacheEntry.cs
- SchemaTypeEmitter.cs
- PropertyFilterAttribute.cs
- InstanceDescriptor.cs
- InvokeHandlers.cs
- TextBox.cs
- DecimalKeyFrameCollection.cs
- _IPv4Address.cs
- UnknownBitmapDecoder.cs
- ListViewItemCollectionEditor.cs
- QueueProcessor.cs
- Executor.cs
- PropertyTabAttribute.cs
- UnmanagedMemoryStream.cs
- TraceContextRecord.cs
- UnsafeNativeMethods.cs
- HotSpot.cs
- MSG.cs
- COM2ICategorizePropertiesHandler.cs
- ProjectionAnalyzer.cs
- MemberHolder.cs
- LogWriteRestartAreaState.cs
- DateTimeFormatInfo.cs
- StrokeCollectionConverter.cs
- ApplicationInterop.cs
- TimelineClockCollection.cs
- CodeDirectoryCompiler.cs
- MergeFilterQuery.cs
- ViewGenResults.cs
- KeyNotFoundException.cs
- BoolExpression.cs
- AssemblyAssociatedContentFileAttribute.cs
- invalidudtexception.cs
- JapaneseCalendar.cs
- ToolStripArrowRenderEventArgs.cs
- StringValidator.cs
- DataListItem.cs
- WebUtility.cs
- FrameworkElement.cs
- CodeBlockBuilder.cs
- _ListenerRequestStream.cs
- EdmConstants.cs
- XmlHierarchyData.cs
- UncommonField.cs
- PointCollection.cs
- PinnedBufferMemoryStream.cs
- ChtmlTextWriter.cs
- SimpleTypeResolver.cs
- CompiledAction.cs
- XmlUtil.cs
- SqlWriter.cs
- ChannelDispatcherCollection.cs
- WebException.cs
- Win32Interop.cs
- ZipIOLocalFileBlock.cs
- SqlProcedureAttribute.cs
- TypefaceMap.cs
- Annotation.cs