+ -
当前位置:首页 → 问答吧 → WCF 服务

WCF 服务

时间:2010-10-13

来源:互联网

找不到类型“IBatisService.boxManageService”,它在 ServiceHost 指令中提供为 Service 特性值,或在配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations 中提供。


大家好!第一次发布WCF服务的时候我命名为boxManageService,但是发布之后我把服务名字改为BoxManageService.同时在配置文件中我也重新指定了
如下代码
XML code
<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Server.BoxManageBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="Server.BoxManageBehavior" name="IBatisService.BoxManageService">
        <endpoint address="ForHttp" binding="basicHttpBinding" contract="IBatisService.IBoxManageService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false"
      multipleSiteBindingsEnabled="true" >
      <serviceActivations>
        
      </serviceActivations>
    </serviceHostingEnvironment>
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>

可是发布的时候却提示最上面的错误!我怀疑别的地方还有隐藏的代码依旧指定的以前的服务名字!只是我没有发现!各位有遇到这种情况的吗

作者: l350045245   发布时间: 2010-10-13

唉!问题解决了

作者: l350045245   发布时间: 2010-10-13