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
- codemethodreferenceexpression.cs
- SessionEndedEventArgs.cs
- PeerNameRegistration.cs
- BitmapMetadataBlob.cs
- WebPartZoneCollection.cs
- TreeNodeStyle.cs
- IncrementalHitTester.cs
- LiteralSubsegment.cs
- HelpProvider.cs
- SourceCollection.cs
- SelectionItemProviderWrapper.cs
- ActivationServices.cs
- ToolStripDropDownMenu.cs
- DebugController.cs
- GeometryValueSerializer.cs
- ApplicationSecurityManager.cs
- SimpleMailWebEventProvider.cs
- PaperSize.cs
- HandlerBase.cs
- XomlDesignerLoader.cs
- X509AsymmetricSecurityKey.cs
- DbDataRecord.cs
- OrderPreservingPipeliningMergeHelper.cs
- CalendarTable.cs
- DesignerForm.cs
- WindowsEditBoxRange.cs
- EventPrivateKey.cs
- TypeElementCollection.cs
- VirtualPath.cs
- HyperLinkDataBindingHandler.cs
- DataGridViewBand.cs
- DataGridViewComboBoxEditingControl.cs
- ISO2022Encoding.cs
- Interfaces.cs
- UInt16Converter.cs
- PropertyRecord.cs
- XmlSchemaAnnotation.cs
- Int32CAMarshaler.cs
- HttpSysSettings.cs
- MarshalDirectiveException.cs
- NavigationWindow.cs
- StreamWriter.cs
- DelegatedStream.cs
- SynchronizedInputProviderWrapper.cs
- AppSecurityManager.cs
- WebControlAdapter.cs
- CompressEmulationStream.cs
- StreamUpdate.cs
- GB18030Encoding.cs
- DateTimeParse.cs
- Relationship.cs
- BitmapEffectState.cs
- SchemaEntity.cs
- ResourcesChangeInfo.cs
- VisualBrush.cs
- ValidationErrorEventArgs.cs
- ThaiBuddhistCalendar.cs
- RuntimeConfigLKG.cs
- HwndHost.cs
- nulltextnavigator.cs
- MdiWindowListStrip.cs
- WindowsEditBox.cs
- DefaultSection.cs
- AuthenticationServiceManager.cs
- HtmlAnchor.cs
- path.cs
- ReadOnlyDataSourceView.cs
- EastAsianLunisolarCalendar.cs
- PromptEventArgs.cs
- JsonDeserializer.cs
- EntityDataSourceDesigner.cs
- Compiler.cs
- DataTableExtensions.cs
- HostedTcpTransportManager.cs
- MultipleCopiesCollection.cs
- XmlRootAttribute.cs
- MediaPlayer.cs
- QilChoice.cs
- ListViewTableCell.cs
- WebFormsRootDesigner.cs
- InstanceHandleReference.cs
- DocumentEventArgs.cs
- HttpChannelHelper.cs
- Decoder.cs
- ListViewTableCell.cs
- Module.cs
- PageAdapter.cs
- BoundColumn.cs
- OrderedEnumerableRowCollection.cs
- AbstractExpressions.cs
- ListDictionaryInternal.cs
- SqlUDTStorage.cs
- GenerateTemporaryAssemblyTask.cs
- DataTableExtensions.cs
- sqlmetadatafactory.cs
- SignalGate.cs
- XsltQilFactory.cs
- BitmapEffect.cs
- InputScopeConverter.cs
- input.cs