私はテストプロジェクトWCFサービスライブラリを持っており、プロジェクトを公開しました。すべての適切なインストールを備えた2003サーバをお持ちください。私は自分のアプリケーションを参照し、.svcをクリックするとこのエラーが出ます。WCFサービス、C#、WCF、VS2008を展開します。
ServiceHostディレクティブのService属性値として提供された 'SearchService'タイプが見つかりませんでした。
これは私のweb.configファイルからの抜粋
<endpoint address="" binding="wsHttpBinding" contract="TestService.ISearchService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
マイインタフェースです:
[ServiceContract]
public interface ISearchService
{
[OperationContract]
string GetName();
}
私の実装:
[ServiceBehavior(InstanceContextMode=InstanceContextMode.PerSession)]
public class SearchService :ISearchService
{
#region ISearchService Members
public string GetName()
{
returnn "HAL-2001"
}
}
を見てみましょうサービスクラス。 –