エンドポイントしている私は、この問題を解決し、誰もが正確な を持っていると思わなかった他の記事に出くわし原因不明の例外サービス「は」ゼロのアプリケーション(非インフラが)
Service 'EmployeeManagerImplementation.EmployeeManagerService' has zero application (non-infrastructure)
endpoints. This might be because no configuration file was found for your application,
or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
iv'eを得続けます彼らの解決策のうちのどれも私のために働いていませんでした。
Service has zero application (non-infrastructure) endpoints
いかなる方法
は、ここに私のapp.configだ<system.serviceModel>
<services>
<service name="Some.Test.EmployeeManagerService">
<endpoint address="net.tcp://localhost:8080/Service" binding="netTcpBinding"
bindingConfiguration="" contract="Contracts.IEmployeeManagerService" />
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
私の契約:
[ServiceContract(Namespace="Some.Test")]
public interface IEmployeeManagerService
{
[OperationContract]
string Test();
}
マイサービス:関連のポスト人々の広告で
public class EmployeeManagerService : IEmployeeManagerService
{
public string Test()
{
return "test";
}
}
Contractにネームスペースを与え、それをサービスタブの名前のために私のapp.config内の接頭辞として使用するようにしました。
また、mexエンドポイントを公開するための提案がありました... 私は実際にこれと何をするのか分かりませんが、私はそれをやりました。
これはなぜ起こるのでしょうか? この問題を解決するにはどうすればよいですか?
o'kは、@Johann Blais でhttp おかげサービス 名前空間 含む実装と同じ正確な名称<サービス名=「EmployeeManagerImplementation.EmployeeManagerService」>のname属性を与えるために必要とされる判明します://スタックオーバーフロー。com/questions/5270956/service-x-has-zero-application-endpoints-i-add-an-end-in-code-wh –
これを回答として追加して受け入れる必要があります。 – flayn
私は助けになった答えへのリンクを入れました... と同様に良い: –