Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Dispatcher / WebFaultClientMessageInspector.cs / 1 / WebFaultClientMessageInspector.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- #pragma warning disable 1634, 1691 namespace System.ServiceModel.Dispatcher { using System; using System.Collections.Generic; using System.Globalization; using System.ServiceModel; using System.Text; using System.Xml; using System.Net; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Web; using System.IO; class WebFaultClientMessageInspector : IClientMessageInspector { public virtual void AfterReceiveReply(ref Message reply, object correlationState) { if (reply != null) { HttpResponseMessageProperty prop = (HttpResponseMessageProperty) reply.Properties[HttpResponseMessageProperty.Name]; if (prop != null && prop.StatusCode == HttpStatusCode.InternalServerError) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new CommunicationException(prop.StatusDescription)); } } } public object BeforeSendRequest(ref Message request, IClientChannel channel) { return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripPanelCell.cs
- DelegatingStream.cs
- Missing.cs
- WebPartZoneBase.cs
- FilteredReadOnlyMetadataCollection.cs
- TrustSection.cs
- NavigationPropertyEmitter.cs
- ControlUtil.cs
- SecurityResources.cs
- QueryContinueDragEvent.cs
- Decimal.cs
- XmlHierarchyData.cs
- DataListItemCollection.cs
- Maps.cs
- RoleServiceManager.cs
- ComponentConverter.cs
- WindowsSlider.cs
- DirectionalLight.cs
- XmlILCommand.cs
- InvalidBodyAccessException.cs
- RepeaterDesigner.cs
- DeviceContext.cs
- InternalConfigHost.cs
- Rect3DConverter.cs
- SendMessageContent.cs
- DropDownButton.cs
- HtmlTableCell.cs
- HttpFileCollection.cs
- SelectionHighlightInfo.cs
- KerberosTicketHashIdentifierClause.cs
- MobileErrorInfo.cs
- OleDbError.cs
- InputManager.cs
- WindowsFormsEditorServiceHelper.cs
- DetailsViewPageEventArgs.cs
- Compiler.cs
- DataGridViewCellValueEventArgs.cs
- SparseMemoryStream.cs
- IntegerFacetDescriptionElement.cs
- EdmTypeAttribute.cs
- XmlUtil.cs
- ClipboardProcessor.cs
- LinqDataSourceHelper.cs
- Parser.cs
- DataGridRow.cs
- MemoryRecordBuffer.cs
- MatchingStyle.cs
- RNGCryptoServiceProvider.cs
- WsiProfilesElementCollection.cs
- TypeListConverter.cs
- OleDbMetaDataFactory.cs
- TreeNodeCollection.cs
- Empty.cs
- MsmqInputMessagePool.cs
- PolyQuadraticBezierSegment.cs
- PathTooLongException.cs
- InputLangChangeEvent.cs
- ScriptingAuthenticationServiceSection.cs
- DataGridViewColumnCollectionEditor.cs
- IntSecurity.cs
- TextDecorationUnitValidation.cs
- ComponentDispatcherThread.cs
- DocumentSequenceHighlightLayer.cs
- ConstructorBuilder.cs
- ServiceDebugBehavior.cs
- TypeElement.cs
- TextBlock.cs
- ToolStripPanelSelectionGlyph.cs
- RenderTargetBitmap.cs
- StringHelper.cs
- EndpointConfigContainer.cs
- UInt16.cs
- TextureBrush.cs
- InfoCardBaseException.cs
- ItemCheckEvent.cs
- LoginView.cs
- IsolatedStorageFilePermission.cs
- IPEndPointCollection.cs
- MethodAccessException.cs
- XmlSchemaInferenceException.cs
- ActiveDesignSurfaceEvent.cs
- isolationinterop.cs
- SafeArrayRankMismatchException.cs
- StatusBarDesigner.cs
- ProfilePropertySettingsCollection.cs
- ApplicationId.cs
- OdbcConnection.cs
- ImageField.cs
- MetadataCache.cs
- GAC.cs
- DoneReceivingAsyncResult.cs
- SqlDataSourceView.cs
- InlineUIContainer.cs
- SerializableAttribute.cs
- PhysicalFontFamily.cs
- UserPreferenceChangingEventArgs.cs
- DrawToolTipEventArgs.cs
- WsatServiceCertificate.cs
- SequenceNumber.cs
- LineServicesRun.cs