CoreWCF: имя контракта не найдено в списке контрактов, реализованных службой.
Я использую эту конфигурацию для CoreWCF.=>.NET Framework 4.7.2=> Пространство имен CoreWCF
Вот моя веб-конфигурация
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="bhv">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="HelloService.HelloService" behaviorConfiguration="bhv">
<endpoint address="" binding="basicHttpBinding" contract="HelloService.IHelloService"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0" />
</system.serviceModel>
using System;
using CoreWCF;
namespace HelloService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IHelloService" in both code and config file together.
[ServiceContract]
public interface IHelloService
{
[OperationContract]
void DoWork();
}
}
using System;
using CoreWCF;
namespace HelloService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "HelloService" in code, svc and config file together.
// NOTE: In order to launch WCF Test Client for testing this service, please select HelloService.svc or HelloService.svc.cs at the Solution Explorer and start debugging.
public class HelloService : IHelloService
{
public void DoWork()
{
}
}
}
Я также добавил сервисный код здесь. Что могло пойти не так, чтобы создать эту услугу?