IIS Developer Express で"WCF 4 Rest Service Template"プロジェクト (テンプレートから)をホストすると、次のようになります。
IIS は認証スキーム 'IntegratedWindowsAuthentication, Anonymous' を指定しましたが、バインディングは正確に 1 つの認証スキームの指定のみをサポートします。有効な認証方式は、Digest、Negotiate、NTLM、Basic、または Anonymous です。1 つの認証スキームのみが使用されるように IIS 設定を変更します。
JSON を返すために、 automaticFormatSelectionEnabledを false に設定する以外に、構成を明示的に変更していません。
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<standardEndpoints>
<webHttpEndpoint>
<!--Configure the WCF REST service base address via the global.asax.cs file and the default endpoint
via the attributes on the <standardEndpoint> element below-->
<standardEndpoint name=""
helpEnabled="true"
automaticFormatSelectionEnabled="false"
/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
エンドポイント構成が明示的に設定されていないことが問題である場合、iis 開発者エクスプレスでこの問題を回避するためにサービスの認証スキームを明示的に設定するには、この種のサービスに対してどのようにすればよいでしょうか?
注: 次のアセンブリMicrosoft.Web.dll & Microsoft.Web.Administration.dllが、アプリケーションの Web サービス プロジェクト/binフォルダーにあり、iss チーム ブログの WCF サービスをホッピングするための回避策で説明されています: http:// blogs.iis.net/vaidyg/archive/2010/07/21/wcf-workaround-for-webmatrix-beta.aspx