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
- SecurityElement.cs
- RequiredFieldValidator.cs
- AsyncStreamReader.cs
- DataGridViewAutoSizeModeEventArgs.cs
- FrugalMap.cs
- LogicalTreeHelper.cs
- HierarchicalDataBoundControlAdapter.cs
- ButtonFieldBase.cs
- DependencyObjectValidator.cs
- CustomAssemblyResolver.cs
- RequestQueue.cs
- Compiler.cs
- CompilerScope.Storage.cs
- TextElementCollectionHelper.cs
- TreeNodeCollection.cs
- ControlPaint.cs
- EnvelopedPkcs7.cs
- DescendantOverDescendantQuery.cs
- GridViewUpdatedEventArgs.cs
- DocumentXmlWriter.cs
- ScriptMethodAttribute.cs
- IPipelineRuntime.cs
- ExtendedProperty.cs
- LayoutEditorPart.cs
- ProcessModelInfo.cs
- BitmapEditor.cs
- ListViewTableRow.cs
- NetDataContractSerializer.cs
- CompModHelpers.cs
- MulticastOption.cs
- ViewSimplifier.cs
- ImageField.cs
- PageAsyncTaskManager.cs
- EntitySetDataBindingList.cs
- XmlSchemaImport.cs
- CellParaClient.cs
- SaveCardRequest.cs
- ExpressionQuoter.cs
- RemotingServices.cs
- TypeDependencyAttribute.cs
- UserNameServiceElement.cs
- IntranetCredentialPolicy.cs
- XmlTypeAttribute.cs
- WebPartAuthorizationEventArgs.cs
- ViewStateAttachedPropertyFeature.cs
- BinaryConverter.cs
- OLEDB_Util.cs
- ImportContext.cs
- DesignerValidatorAdapter.cs
- EmptyEnumerator.cs
- UserPrincipalNameElement.cs
- IntSecurity.cs
- Scene3D.cs
- Vector3D.cs
- ValueUtilsSmi.cs
- ByteStream.cs
- RangeContentEnumerator.cs
- StructuralType.cs
- MetafileEditor.cs
- PerformanceCounterCategory.cs
- WebPartActionVerb.cs
- _SingleItemRequestCache.cs
- datacache.cs
- DataSourceSelectArguments.cs
- DynamicPropertyReader.cs
- SQLChars.cs
- UnsafeNativeMethods.cs
- MenuEventArgs.cs
- TextParaClient.cs
- DataControlField.cs
- QueuePropertyVariants.cs
- PersistChildrenAttribute.cs
- TreeNodeBinding.cs
- TextMarkerSource.cs
- ZeroOpNode.cs
- ReaderWriterLockWrapper.cs
- DbProviderFactoriesConfigurationHandler.cs
- SafeCryptoKeyHandle.cs
- RegionIterator.cs
- CodeBinaryOperatorExpression.cs
- KerberosRequestorSecurityToken.cs
- OperationParameterInfoCollection.cs
- VoiceInfo.cs
- DataBindingExpressionBuilder.cs
- TypeInitializationException.cs
- WindowsClientElement.cs
- KeyFrames.cs
- ManipulationDeltaEventArgs.cs
- RouteValueDictionary.cs
- ReadOnlyState.cs
- Rfc2898DeriveBytes.cs
- Ray3DHitTestResult.cs
- ProtocolReflector.cs
- Misc.cs
- DesignerDataRelationship.cs
- TextRunTypographyProperties.cs
- DockPanel.cs
- MobileUserControlDesigner.cs
- Stopwatch.cs
- TypeUtil.cs