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
- ButtonChrome.cs
- WebCategoryAttribute.cs
- SiteMembershipCondition.cs
- SystemIcmpV4Statistics.cs
- InstanceDescriptor.cs
- MediaEntryAttribute.cs
- RegexTree.cs
- CodeParameterDeclarationExpression.cs
- RefreshPropertiesAttribute.cs
- SHA1.cs
- SoapServerProtocol.cs
- Set.cs
- DSASignatureFormatter.cs
- PersonalizationEntry.cs
- ExceptionUtil.cs
- DataColumnChangeEvent.cs
- GlyphTypeface.cs
- StackBuilderSink.cs
- MultiTargetingUtil.cs
- METAHEADER.cs
- CodeLabeledStatement.cs
- AsyncPostBackErrorEventArgs.cs
- CountAggregationOperator.cs
- RowType.cs
- Section.cs
- CompositeScriptReference.cs
- KeySpline.cs
- EntityExpressionVisitor.cs
- CatalogZoneAutoFormat.cs
- ModuleConfigurationInfo.cs
- OleDbStruct.cs
- TransportChannelFactory.cs
- SchemaNamespaceManager.cs
- DispatcherFrame.cs
- EventMappingSettings.cs
- DataMemberFieldConverter.cs
- DefaultMemberAttribute.cs
- MailBnfHelper.cs
- HostingPreferredMapPath.cs
- IxmlLineInfo.cs
- ProxyFragment.cs
- TextRenderer.cs
- TimersDescriptionAttribute.cs
- StrokeCollection.cs
- VariantWrapper.cs
- LoginName.cs
- AsyncCompletedEventArgs.cs
- ADMembershipProvider.cs
- ToolStripOverflow.cs
- JoinQueryOperator.cs
- UInt32Storage.cs
- AddInAdapter.cs
- BrowserDefinitionCollection.cs
- XmlSchemaInclude.cs
- BaseHashHelper.cs
- ExpressionBuilder.cs
- UserControlAutomationPeer.cs
- ColumnHeaderConverter.cs
- MetadataUtilsSmi.cs
- DataGridViewTopRowAccessibleObject.cs
- DesignerEventService.cs
- TaiwanLunisolarCalendar.cs
- DataContext.cs
- DataMemberFieldEditor.cs
- EmbossBitmapEffect.cs
- JsonDeserializer.cs
- ReadOnlyCollectionBase.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- PlaceHolder.cs
- SqlOuterApplyReducer.cs
- mediaclock.cs
- CompilerErrorCollection.cs
- Cursors.cs
- ADMembershipUser.cs
- Lease.cs
- MouseWheelEventArgs.cs
- SequenceDesigner.cs
- CompilerCollection.cs
- TextCompositionEventArgs.cs
- XmlSubtreeReader.cs
- DbConnectionStringBuilder.cs
- CompositeScriptReferenceEventArgs.cs
- TextEditorParagraphs.cs
- Debug.cs
- DrawingAttributes.cs
- ClientRoleProvider.cs
- WSAddressing10ProblemHeaderQNameFault.cs
- Intellisense.cs
- ListViewItemSelectionChangedEvent.cs
- PipelineComponent.cs
- LinkButton.cs
- ExpressionPrinter.cs
- BreakRecordTable.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- InputReportEventArgs.cs
- RepeaterCommandEventArgs.cs
- XmlParserContext.cs
- XmlTextReaderImpl.cs
- IsolatedStorage.cs
- AtomMaterializer.cs