///在使用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>