WCF部署到IIS不使用svc文件

<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation debug="false" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息-->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
      <serviceActivations>
        <!--服务类以及相对地址http://localhost:1298/WCFService1/CalculateService.svc-->
        <add relativeAddress="CalculateService.svc" service="CarRentalService.CalculateService"  />
      </serviceActivations>
    </serviceHostingEnvironment>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
 
</configuration>

posted @ 2013-10-15 21:19  feidaochuanqing  阅读(265)  评论(0编辑  收藏  举报