Web サービスを作成し、サービスがローカル サーバー (ASP.NET 開発サーバー) で実行されているときに、WCF テスト クライアントを使用してメソッドを呼び出すことができます。
ただし、Web サービスを QA サーバーに公開し、いずれかのメソッドをテスト クライアントで呼び出すと、次のエラー メッセージが表示されます。
The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8).
Fiddler を使用して要求を調べると、mywebservice.svc にアクセスしたかのように、返されたのは既定のページであることがわかります。
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
メソッドを呼び出す代わりにデフォルト ページが返される理由がわかりません。メソッドを呼び出せるようにするために、サーバーで何かする必要がありますか? MIME タイプを設定する必要はありますか?