wcf实现

///在使用app.config配置文件时
///这里我比较疑惑的是在这里的参数只用写命名空间.类名或接口就可以找到是哪个dll文件了,奇怪呀,应该写上dll文件呀?不知道为什么这里不用写呀!(比如:反射)尴尬
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>
      <!--name参数是:命名空间.类名-->
      <service name="DataObjLibrarySpace.DataObj" behaviorConfiguration="servicBehavior">
        <!--contract参数是:命名空间.接口名
        <endpoint address="Hello" binding="basicHttpBinding" contract="DataObjLibraryContractSpace.IDataObj"/>
        <endpoint binding="mexHttpBinding" contract="IMetadataExchange" address="mex" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:1234"/>
          </baseAddresses>
        </host>
      </service>  
      
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="servicBehavior">
          <serviceMetadata  httpGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    
  </system.serviceModel>
</configuration>

posted on 2011-06-24 16:46  SonyXbox  阅读(162)  评论(0编辑  收藏  举报

导航