0

ServiceActivationException: コンパイル中の例外のため、サービス '//Service.svc' をアクティブ化できません。例外メッセージは次のとおりです。サービスのベース アドレスが提供されていません。少なくとも 1 つのベース アドレスを指定します。

web.configでベースアドレスを提供しました

<system.serviceModel>
<services>
  <service name="WFService.Service1" behaviorConfiguration="WFService.Service1Behavior">
    <endpoint name="json" address="http://localhost:3003/WFServiceHost/Service.svc/json" binding="webHttpBinding" bindingConfiguration="webHttpBindingConfig" contract="WFService.IService" behaviorConfiguration="WFServiceJsonEndpointBehavior"/>
    <host>
      **<baseAddresses>
        <add baseAddress="http://localhost:3003/WFServiceHost/Service.svc"/>
      </baseAddresses>**
    </host>
  </service>
</services>

service.svc には、Factory="System.ServiceModel.Activation.WorkflowServiceHostFactory" があります。

任意のアイデア、それに対する解決策は何ですか?

4

1 に答える 1

1

baseAddress に Service.svc を含めないでください

    <system.serviceModel>
    <services>
      <service name="WFService.Service1" behaviorConfiguration="WFService.Service1Behavior">
        <endpoint name="json" address="json" binding="webHttpBinding" bindingConfiguration="webHttpBindingConfig" contract="WFService.IService" behaviorConfiguration="WFServiceJsonEndpointBehavior"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:3003/WFServiceHost/"/>
          </baseAddresses>
        </host>
      </service>
    </services>
于 2012-04-09T18:09:47.533 に答える