Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Dispatcher / WebFaultClientMessageInspector.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BasicKeyConstraint.cs
- TimeSpanOrInfiniteConverter.cs
- DataGridViewCellParsingEventArgs.cs
- PointAnimationBase.cs
- XXXInfos.cs
- StorageAssociationSetMapping.cs
- DbParameterCollection.cs
- XmlLinkedNode.cs
- BamlRecordHelper.cs
- XmlEventCache.cs
- UnsupportedPolicyOptionsException.cs
- RightsManagementManager.cs
- DataBoundControlHelper.cs
- CodeNamespaceImportCollection.cs
- DataGridViewRowPrePaintEventArgs.cs
- ClusterSafeNativeMethods.cs
- DiscoveryMessageProperty.cs
- HostedHttpTransportManager.cs
- EncodingNLS.cs
- DataGridCell.cs
- XPathMessageContext.cs
- HwndSourceParameters.cs
- UIElementAutomationPeer.cs
- DataMemberFieldConverter.cs
- HWStack.cs
- TypeValidationEventArgs.cs
- TraceEventCache.cs
- TimeSpan.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ShaderEffect.cs
- ToolboxBitmapAttribute.cs
- LiteralControl.cs
- UpdateExpressionVisitor.cs
- ButtonBaseAutomationPeer.cs
- SoapAttributes.cs
- xsdvalidator.cs
- MULTI_QI.cs
- UIElement3D.cs
- IntPtr.cs
- BrushConverter.cs
- Currency.cs
- SerializationObjectManager.cs
- Int64AnimationBase.cs
- SqlDataSourceView.cs
- PasswordDeriveBytes.cs
- MailMessageEventArgs.cs
- GCHandleCookieTable.cs
- ViewManager.cs
- BmpBitmapDecoder.cs
- ACL.cs
- EarlyBoundInfo.cs
- UnsafeNativeMethodsCLR.cs
- ComponentCodeDomSerializer.cs
- xsdvalidator.cs
- tooltip.cs
- EventBuilder.cs
- Rijndael.cs
- Window.cs
- MainMenu.cs
- XsdDateTime.cs
- xml.cs
- XmlQueryStaticData.cs
- FileDataSourceCache.cs
- RowToFieldTransformer.cs
- FixUp.cs
- ThemeInfoAttribute.cs
- IntellisenseTextBox.cs
- MSAAWinEventWrap.cs
- ObservableCollection.cs
- UIElementParagraph.cs
- DecimalConstantAttribute.cs
- PageStatePersister.cs
- DataTableMapping.cs
- ObjectList.cs
- Int32Rect.cs
- QueryOperatorEnumerator.cs
- XPathBinder.cs
- ColorAnimationBase.cs
- MessageHeaderException.cs
- ClientBuildManagerCallback.cs
- ContentControl.cs
- X509SecurityTokenAuthenticator.cs
- StorageEntityTypeMapping.cs
- TransformGroup.cs
- XamlValidatingReader.cs
- TypeLibraryHelper.cs
- TextDpi.cs
- PersistenceTypeAttribute.cs
- _NegotiateClient.cs
- CoTaskMemHandle.cs
- FormViewModeEventArgs.cs
- GenerateHelper.cs
- HtmlEmptyTagControlBuilder.cs
- EncryptedKey.cs
- SecurityException.cs
- ProviderBase.cs
- UncommonField.cs
- NameSpaceExtractor.cs
- SystemMulticastIPAddressInformation.cs
- PageCatalogPart.cs