Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)

Autofac wired WCF service Config

By: NickJosevski on Apr 20th, 2011  |  syntax: XML  |  size: 1.66 KB  |  hits: 191  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!-- WCF server -->
  2. <system.serviceModel>
  3.     <services>
  4.       <service name="demo.product.app.ProductService.svc">
  5.         <endpoint address="ProductService.svc" binding="wsHttpBinding"
  6.                  bindingConfiguration="ProductService_wsHttpBinding"
  7.                  name="ProductService"
  8.                  contract="demo.contracts.service.IProductService">
  9.           <identity>
  10.             <dns value="localhost" />
  11.           </identity>
  12.         </endpoint>
  13.         <host>
  14.           <baseAddresses>
  15.             <add baseAddress="http://localhost:6985/"/>
  16.           </baseAddresses>
  17.         </host>
  18.       </service>
  19.     </services>
  20.  
  21.     <bindings>
  22.       <wsHttpBinding>
  23.         <binding name="ProductService_wsHttpBinding">
  24.           <security mode="Message">
  25.             <transport clientCredentialType="Windows"  />
  26.           </security>
  27.         </binding>
  28.       </wsHttpBinding>
  29.     </bindings>
  30. </system.serviceModel>
  31.  
  32. <!-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --->
  33. <!-- MVC client -->
  34.  
  35. <system.serviceModel>
  36.     <client>
  37.       <endpoint
  38.        name="demo.product.app.ProductService.svc"
  39.        address="http://localhost:6985/ProductService.svc"
  40.         binding="wsHttpBinding"
  41.        bindingConfiguration="ProductService_wsHttpBinding"
  42.         contract="demo.contracts.service.IProductService"/>
  43.     </client>
  44.  
  45.     <bindings>
  46.       <wsHttpBinding>
  47.         <binding name="ProductService_wsHttpBinding">
  48.           <security mode="Message">
  49.             <transport clientCredentialType="Windows"  />
  50.           </security>
  51.         </binding>
  52.       </wsHttpBinding>
  53.     </bindings>
  54. </system.serviceModel>