私は非常に単純な (オンラインの開始サンプルを参照してください) wcf サービス ライブラリを持っています。そして、localhost の WCF Test Client exe を介して実行できます。しかし、soapUI などの別のクライアント ツールを介してアクセスすると、エラーが発生します。エラーはサービスのセキュリティ構成に関連していると思います。
この投稿で提案されているように、サービスのバインディングを変更するにはどうすればよいですか:
デバッグの再起動後に実行すると、「無効または期限切れのセキュリティ コンテキスト トークン」が表示される
これはapp.configまたはweb.configにありますか。私のプロジェクトには web.config さえありません。
これが私のapp.configです:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="NorthwindServices.ProductService">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8732/Design_Time_Addresses/NorthwindServices/ProductService/" />
</baseAddresses>
</host>
<endpoint address ="" binding="wsHttpBinding"
contract="NorthwindServices.IProducts">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>