Code:
/ 4.0 / 4.0 / untmp / 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. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClientUtils.cs
- SHA1CryptoServiceProvider.cs
- EdgeModeValidation.cs
- CustomAssemblyResolver.cs
- CodeAttributeArgument.cs
- BulletedListEventArgs.cs
- DefaultEventAttribute.cs
- HtmlTableRow.cs
- ResourcePermissionBaseEntry.cs
- SiteMapProvider.cs
- TypeInitializationException.cs
- NumberFunctions.cs
- XslCompiledTransform.cs
- XmlDataDocument.cs
- ChtmlTextBoxAdapter.cs
- TypedReference.cs
- SQLDouble.cs
- VariableDesigner.xaml.cs
- DesignerActionHeaderItem.cs
- XPathPatternBuilder.cs
- AuthorizationSection.cs
- GetIndexBinder.cs
- Attachment.cs
- XmlQueryType.cs
- CfgParser.cs
- PanelDesigner.cs
- UserControl.cs
- PrintDialogDesigner.cs
- ExtractorMetadata.cs
- EntityDataSourceDesigner.cs
- BuiltInExpr.cs
- SingleObjectCollection.cs
- DataGridViewRowCollection.cs
- XmlLinkedNode.cs
- DesignerLinkAdapter.cs
- TaskHelper.cs
- PolyLineSegmentFigureLogic.cs
- FullTextState.cs
- DefaultBindingPropertyAttribute.cs
- GuidTagList.cs
- DayRenderEvent.cs
- BitmapVisualManager.cs
- TypeForwardedToAttribute.cs
- HandlerWithFactory.cs
- _ListenerResponseStream.cs
- StreamWithDictionary.cs
- Exceptions.cs
- TimeSpan.cs
- _NativeSSPI.cs
- ContentControl.cs
- SessionParameter.cs
- AssemblyName.cs
- StatusBar.cs
- RSAProtectedConfigurationProvider.cs
- TableTextElementCollectionInternal.cs
- SpanIndex.cs
- XmlSchemaSimpleContent.cs
- BindingEditor.xaml.cs
- DateTimeStorage.cs
- cookiecontainer.cs
- ConfigurationElement.cs
- ListItemCollection.cs
- MemberRestriction.cs
- SystemIPInterfaceProperties.cs
- MediaContext.cs
- ToolStripDropDownDesigner.cs
- SelectionItemProviderWrapper.cs
- ReachFixedDocumentSerializer.cs
- PhysicalAddress.cs
- TripleDESCryptoServiceProvider.cs
- _HelperAsyncResults.cs
- mda.cs
- ObjectHelper.cs
- StrongNameUtility.cs
- PageSettings.cs
- JapaneseLunisolarCalendar.cs
- ApplicationServiceHelper.cs
- TextUtf8RawTextWriter.cs
- MessageSecurityOverHttpElement.cs
- XamlBrushSerializer.cs
- IsolatedStorage.cs
- SerializationObjectManager.cs
- ListBindableAttribute.cs
- ParameterToken.cs
- ReadOnlyObservableCollection.cs
- UnsafeNativeMethods.cs
- PostBackOptions.cs
- SQLByte.cs
- WebBrowser.cs
- clipboard.cs
- TabItemWrapperAutomationPeer.cs
- MemberInitExpression.cs
- Matrix.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- PixelFormat.cs
- DispatcherTimer.cs
- EntitySet.cs
- RegisteredDisposeScript.cs
- HashHelper.cs
- FigureParaClient.cs