打开app.config文件

节点下面添加以下信息,对应位置替换为自己的服务

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

    <!--Common.ServerContract.AndroidContract.Monitor-->
    <!--IChartManager服务-->
    <services>
      <service behaviorConfiguration="Server.FunctionStation.AndroidServices.Monitor.ChartHandler" name="Server.FunctionStation.AndroidServices.Monitor.CartHandler">
        <endpoint address="" binding="basicHttpBinding" contract="Common.ServiceContract.AndroidContract.Monitor.IChartManager">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:3003/IChartManager/" />
          </baseAddresses>
        </host>
      </service>

    </services>
    <behaviors>
       <serviceBehaviors>
        <!--Common.ServerContract.AndroidContract.Monitor-->
        <behavior name="Server.FunctionStation.AndroidServices.Monitor.ChartHandler">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
 </system.serviceModel>