wcf 基本配置

 1   <system.serviceModel>
 2     <services>
 3       <service name="ServiceUpdater.ServiceUpdate" behaviorConfiguration="http" >
 4         <host>
 5           <baseAddresses>
 6             <add baseAddress="http://localhost:7777/Updater"/>
 7           </baseAddresses>
 8         </host>
 9         <endpoint binding="webHttpBinding" contract="ServiceUpdater.IServiceUpdate" behaviorConfiguration="web"></endpoint>
10       </service>
11             
12       <service name="HangerService.Hanger" behaviorConfiguration="http" >
13         <host>
14           <baseAddresses>
15             <add baseAddress="http://localhost:7777/Hanger"/>
16           </baseAddresses>
17         </host>
18         <endpoint binding="webHttpBinding" contract="HangerService.IHanger" behaviorConfiguration="web" bindingConfiguration="webBinding"></endpoint>
19       </service>
20       
21       <service name="Dade.DataCenter.CutBoard.Bll.Service" behaviorConfiguration="http">
22         <host>
23           <baseAddresses>
24             <add baseAddress="http://localhost:7777/CutBoard"/>
25           </baseAddresses>
26         </host>
27         <endpoint binding="webHttpBinding" contract="Dade.DataCenter.CutBoard.Bll.IService" behaviorConfiguration="web"></endpoint>
28         <endpoint address="123" binding="basicHttpBinding" contract="Dade.DataCenter.CutBoard.Bll.IService"></endpoint>
29       </service>            
30     </services>
31     
32     <behaviors>
33       <serviceBehaviors>
34         <behavior name="mex">
35           <serviceMetadata/>
36         </behavior>
37         <behavior name="http">
38           <serviceMetadata httpGetEnabled="true"/>
39           <serviceDebug includeExceptionDetailInFaults="true"  httpHelpPageEnabled="true"/>
40         </behavior>
41       </serviceBehaviors>
42       
43       <endpointBehaviors>
44         <behavior name="web">
45           <webHttp helpEnabled="true"/>
46         </behavior>
47       </endpointBehaviors>
48     </behaviors>
49     
50     <bindings>
51       <webHttpBinding>
52         <binding name="webBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
53           <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
54         </binding>
55       </webHttpBinding>      
56     </bindings>
57     
58   </system.serviceModel>

 

posted on 2017-09-22 17:30  jonney_wang  阅读(142)  评论(0编辑  收藏  举报

导航