code_junkie

How do you configure WCF to support FaultContracts where both the host and client are in the same process using a net.pipe?

Nov 11th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).
  2.  
  3. public class ValidationException : ApplicationException { }
  4.  
  5. <system.serviceModel>
  6.  
  7. <client>
  8. <endpoint name="Client"
  9. contract="IService"
  10. address="net.pipe://localhost/ServiceTest/"
  11. binding="netNamedPipeBinding"
  12. bindingConfiguration="netPipeBindingConfig" />
  13. </client>
  14.  
  15. <services>
  16. <service
  17. name="Service"
  18. behaviorConfiguration="ServiceFaults">
  19. <host>
  20. <baseAddresses>
  21. <add baseAddress="net.pipe://localhost/ServiceTest/"/>
  22. <add baseAddress="http://localhost/ServiceTest/"/>
  23. </baseAddresses>
  24. </host>
  25. <endpoint
  26. address=""
  27. binding="netNamedPipeBinding"
  28. bindingConfiguration="netPipeBindingConfig"
  29.  
  30. name="ServicePipe"
  31. contract="IService" />
  32. <endpoint
  33. address="MEX"
  34. binding="mexNamedPipeBinding"
  35. bindingConfiguration="mexNetPipeBindingConfig"
  36. name="MexUserServicePipe"
  37. contract="IMetadataExchange" />
  38. </service>
  39. </services>
  40.  
  41. <bindings>
  42. <netNamedPipeBinding>
  43. <binding name="netPipeBindingConfig"
  44. closeTimeout="00:30:00"
  45. sendTimeout="00:30:00" />
  46. </netNamedPipeBinding>
  47. <mexNamedPipeBinding>
  48. <binding name="mexNetPipeBindingConfig"></binding>
  49. </mexNamedPipeBinding>
  50. </bindings>
  51.  
  52. <behaviors>
  53. <serviceBehaviors>
  54. <behavior name="ServiceFaults">
  55. <serviceDebug includeExceptionDetailInFaults="true"/>
  56. </behavior>
  57. <behavior name="MEX">
  58. <serviceMetadata
  59. httpGetEnabled="true"
  60. httpGetUrl="http://localhost/ServiceTest/MEX"/>
  61. </behavior>
  62. </serviceBehaviors>
  63. </behaviors>
  64.  
  65. </system.serviceModel>
Add Comment
Please, Sign In to add comment