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
- StylusPointPropertyInfo.cs
- objectquery_tresulttype.cs
- DataComponentGenerator.cs
- XsltInput.cs
- TextEffect.cs
- XmlElementAttribute.cs
- CurrencyWrapper.cs
- OperationParameterInfo.cs
- ActivityInterfaces.cs
- DefaultCommandConverter.cs
- XmlEventCache.cs
- CheckedPointers.cs
- KeyValuePair.cs
- BitArray.cs
- StoryFragments.cs
- StylusPlugin.cs
- NetworkCredential.cs
- DesignerDataRelationship.cs
- TreeViewHitTestInfo.cs
- Monitor.cs
- ListenerElementsCollection.cs
- LogReservationCollection.cs
- AuthenticateEventArgs.cs
- ObjectListFieldsPage.cs
- EdmEntityTypeAttribute.cs
- DrawingVisual.cs
- ServiceModelPerformanceCounters.cs
- RC2.cs
- DbException.cs
- Helpers.cs
- ControlBuilder.cs
- Filter.cs
- Inflater.cs
- DbProviderFactories.cs
- webbrowsersite.cs
- XamlFxTrace.cs
- AuthenticationException.cs
- CodeEntryPointMethod.cs
- TraceHwndHost.cs
- ChangeNode.cs
- PermissionSetTriple.cs
- ObjectQuery_EntitySqlExtensions.cs
- ActiveXHelper.cs
- PackagePartCollection.cs
- ChameleonKey.cs
- InternalTypeHelper.cs
- RegexGroupCollection.cs
- TransactionState.cs
- PerspectiveCamera.cs
- CodeIterationStatement.cs
- Token.cs
- WebPartEditorApplyVerb.cs
- DocumentViewerBase.cs
- _AutoWebProxyScriptHelper.cs
- SolidColorBrush.cs
- RightNameExpirationInfoPair.cs
- XPathNodePointer.cs
- SerializerProvider.cs
- PositiveTimeSpanValidator.cs
- SendKeys.cs
- ZeroOpNode.cs
- MetadataFile.cs
- Win32.cs
- ActiveXSite.cs
- WebPartConnectionsConfigureVerb.cs
- AspNetHostingPermission.cs
- AdornedElementPlaceholder.cs
- FocusWithinProperty.cs
- DataControlExtensions.cs
- DataControlPagerLinkButton.cs
- InitializerFacet.cs
- control.ime.cs
- BCLDebug.cs
- XmlnsCache.cs
- WebServiceHost.cs
- SoapExtension.cs
- GenericTextProperties.cs
- ConfigurationPermission.cs
- SendKeys.cs
- AutomationFocusChangedEventArgs.cs
- HijriCalendar.cs
- TypeUtil.cs
- BindableTemplateBuilder.cs
- ImageProxy.cs
- RootBuilder.cs
- ProxyWebPartManager.cs
- AnnotationResource.cs
- DocumentApplicationJournalEntryEventArgs.cs
- TableSectionStyle.cs
- EnterpriseServicesHelper.cs
- AudioDeviceOut.cs
- XmlObjectSerializerContext.cs
- UIElementIsland.cs
- PasswordRecoveryAutoFormat.cs
- Sequence.cs
- DataBoundControlHelper.cs
- TextBox.cs
- ServerType.cs
- WCFServiceClientProxyGenerator.cs
- SiteMap.cs