windows通信基础(服务器配置文件)

Continue

 1<?xml version="1.0" encoding="utf-8" ?>
 2<configuration>
 3  <system.serviceModel>
 4
 5    <services>
 6      <!-- 注意: 服务名称必须与服务实现的配置名称相匹配。 -->
 7      <service name="Zhgf.Services.UserInfo" behaviorConfiguration="MyServiceTypeBehaviors" >
 8        <!-- 添加下列终结点。 -->
 9        <!-- 注意: 服务必须有一个 http 基址以便添加此终结点。 -->
10        <endpoint contract="Zhgf.IServices.IUserInfo" binding="wsHttpBinding" address="" />
11        <!--主机Uri表现形式-->
12        <host>
13          <baseAddresses>
14            <add baseAddress="http://localhost:8080/WCFDemo/Services"/>
15          </baseAddresses>
16        </host>
17      </service>
18    </services>
19
20    <behaviors>
21      <serviceBehaviors>
22        <behavior name="MyServiceTypeBehaviors" >
23          <!-- 将下列元素添加到服务行为配置中。 -->
24          <serviceMetadata httpGetEnabled="true" />
25        </behavior>
26      </serviceBehaviors>
27    </behaviors>
28
29  </system.serviceModel>
30</configuration>
31

posted on 2009-08-23 10:29  冷无风  阅读(214)  评论(0编辑  收藏  举报

导航