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
- SigningCredentials.cs
- LinqDataSourceDisposeEventArgs.cs
- RootBrowserWindowProxy.cs
- WhitespaceRuleLookup.cs
- MessageQueueConverter.cs
- XmlQueryOutput.cs
- ComponentResourceKey.cs
- CssStyleCollection.cs
- SourceFilter.cs
- GZipStream.cs
- KeyValuePairs.cs
- TimeSpanOrInfiniteValidator.cs
- RequestTimeoutManager.cs
- DriveInfo.cs
- indexingfiltermarshaler.cs
- InputScopeManager.cs
- ListBoxItemAutomationPeer.cs
- SecurityPolicySection.cs
- CellPartitioner.cs
- TransportSecurityProtocolFactory.cs
- WindowsStatusBar.cs
- ColorContext.cs
- NonBatchDirectoryCompiler.cs
- UniqueIdentifierService.cs
- ImportOptions.cs
- FormsAuthenticationEventArgs.cs
- ImageListUtils.cs
- TrackingValidationObjectDictionary.cs
- HtmlTable.cs
- MediaElement.cs
- SchemaImporterExtensionElementCollection.cs
- BufferedGraphicsContext.cs
- DPAPIProtectedConfigurationProvider.cs
- FormatVersion.cs
- MsmqIntegrationBindingElement.cs
- MailAddressCollection.cs
- Walker.cs
- PathGradientBrush.cs
- TableChangeProcessor.cs
- CounterNameConverter.cs
- DesignerTransaction.cs
- PreviewPageInfo.cs
- ServiceActivationException.cs
- TriggerActionCollection.cs
- Image.cs
- RegexParser.cs
- XPathCompileException.cs
- SafeMarshalContext.cs
- Socket.cs
- OleCmdHelper.cs
- StylusPlugInCollection.cs
- ReadOnlyAttribute.cs
- MethodInfo.cs
- FormatException.cs
- EntityViewGenerator.cs
- SignatureToken.cs
- StringBuilder.cs
- NullableIntMinMaxAggregationOperator.cs
- PrintDialog.cs
- InputLanguage.cs
- EncodingInfo.cs
- VersionPair.cs
- FixedFlowMap.cs
- CompModSwitches.cs
- DetailsViewInsertEventArgs.cs
- FormParameter.cs
- SmtpTransport.cs
- EntityDataSourceWizardForm.cs
- UdpRetransmissionSettings.cs
- RelationshipEnd.cs
- ReplacementText.cs
- SQLChars.cs
- DebuggerAttributes.cs
- EventLogPermissionEntryCollection.cs
- ProviderSettings.cs
- WorkflowInstanceRecord.cs
- AbstractExpressions.cs
- HandlerFactoryWrapper.cs
- GridViewUpdatedEventArgs.cs
- CompatibleIComparer.cs
- ScrollChrome.cs
- Site.cs
- EventHandlerList.cs
- RSAProtectedConfigurationProvider.cs
- RightsManagementProvider.cs
- UInt16Converter.cs
- RadialGradientBrush.cs
- NumberFormatInfo.cs
- Config.cs
- DataGridItem.cs
- ToolStripItem.cs
- IIS7WorkerRequest.cs
- InternalPolicyElement.cs
- TreeViewImageGenerator.cs
- EnumerableRowCollection.cs
- EntityContainerRelationshipSet.cs
- FunctionUpdateCommand.cs
- RecognizeCompletedEventArgs.cs
- SoapFault.cs
- HeaderElement.cs