修正: SSL 認証にクライアント証明書を使用する IIS ホスト WCF サービスを実行すると、System.NotSupportedException 例外がスローされます

適用先
.NET Framework 3.5 Service Pack 1

現象

たとえば次のようなシナリオを考えてみます。

  • インターネット インフォメーション サービス (IIS) でホストされる Windows Communication Foundation (WCF) サービスを作成します。
  • WCF サービスで WebScriptEnablingBehavior クラスを使用します。
  • Secure Sockets Layer (SSL) 認証にクライアント証明書を使用するように WCF サービスを構成します。 これを行うには、Web.config ファイルの ClientCredentialType プロパティを Certificate に設定します。

このシナリオでは、WCF サービスを実行すると、System.NotSupportedException 例外がスローされ、次のようなエラー メッセージが表示されます。

サービス 'None' の SSL 設定が、IIS 'Ssl、SslNegotiateCert、SslRequireCert、SslMapCert、Ssl128' の設定と一致しません。

原因

この問題は、HttpTransportBindingElement インスタンスの一部のプロパティが自動生成された javascript プロキシ エンドポイントにコピーされないために発生します。

解決策

サポートされている修正プログラムが Microsoft から入手できるようになりました。 ただし、この記事で説明する問題のみを修正することを目的としています。 この特定の問題が発生しているシステムにのみ適用します。

この問題を解決するには、Microsoft カスタマー サポート サービスに問い合わせて修正プログラムを入手してください。 Microsoft カスタマー サポート サービスの電話番号とサポート コストに関する情報の完全な一覧については、次の Microsoft Web サイトを参照してください。

http://support.microsoft.com/contactus/?ws=support注 特殊なケースでは、サポート呼び出しに通常発生する料金は、Microsoft サポート Professional が特定の更新プログラムによって問題が解決されると判断した場合に取り消される可能性があります。 ただし、特定の更新プログラムの対象とならない追加の質問および問題については、通常のサポート料金が適用されます。

前提条件

この修正プログラムを適用するには、.NET Framework 3.5 Service Pack 1 (SP1) がインストールされている必要があります。

再起動の必要性

修正プログラムをインストールした後、コンピューターを再起動する必要はありません。

修正プログラムの置き換えに関する情報

この修正プログラムは、他の修正プログラムを置き換えるものではありません。
  この修正プログラムの英語版には、次の表に示すファイル属性 (またはそれ以降のファイル属性) があります。 これらのファイルの日付と時刻は世界協定時 (UTC) で記載されています。 ファイル情報に表示される時刻は、ローカル時刻に変換されています。 UTC とローカル時刻との時差を確認するには、[コントロール パネル] の [日付と時刻][タイム ゾーン] タブを使用してください。

Windows Server 2000、Windows Server 2003、Windows XP の x86 ベースのバージョン

ファイル名 ファイルのバージョン ファイル サイズ 日付 時刻 プラットフォーム
System.servicemodel.web.dll 3.5.594.4152 569,344 2009 年 7 月 22 日 01:51 x86

              

Windows Server 2000、Windows Server 2003、Windows XP の x64 ベースのバージョン

ファイル名 ファイルのバージョン ファイル サイズ 日付 時刻 プラットフォーム
System.servicemodel.web.dll 3.5.594.4152 491,520 2009 年 7 月 22 日 02:13 x64

              

Windows Server 2000、Windows Server 2003、Windows XP 用の Itanium ベースのバージョン

ファイル名 ファイルのバージョン ファイル サイズ 日付 時刻 プラットフォーム
System.servicemodel.web.dll 3.5.594.4152 491,520 2009 年 7 月 22 日 02:26 IA-64

              

状態

Microsoft は、これが "適用対象" セクションに記載されている Microsoft 製品の問題であることを確認しました。

回避策

この問題を回避するには、IIS でサービスをホストするのではなく、WCF サービスをセルフホストします。

追加情報

スタック ダンプ情報

System.ServiceModel.dll!System.ServiceModel.Channels.HttpsChannelListener.ApplyHostedContext(System.ServiceModel.Activation.VirtualPathExtension virtualPathExtension, bool isMetadataListener) + 0x1b7 bytes    

System.ServiceModel.dll!System.ServiceModel.Channels.HttpsTransportBindingElement.BuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x69 bytes    

  System.ServiceModel.dll!System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener<System.__Canon>() + 0x5f bytes       

System.ServiceModel.dll!System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x66 bytes    

System.ServiceModel.Web.dll!System.ServiceModel.Channels.WebScriptMetadataMessageEncodingBindingElement.BuildChannelListener<System.__Canon>(System.ServiceModel.Channels.BindingContext context) + 0x4b bytes    

  System.ServiceModel.dll!System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener<System.__Canon>() + 0x5f bytes       

        System.ServiceModel.dll!System.ServiceModel.Channels.Binding.BuildChannelListener<System.__Canon>(System.Uri listenUriBaseAddress, string listenUriRelativeAddress, System.ServiceModel.Description.ListenUriMode listenUriMode, System.ServiceModel.Channels.BindingParameterCollection parameters) + 0xa6 bytes 

        System.ServiceModel.dll!System.ServiceModel.Channels.Binding.BuildChannelListener<System.__Canon>(System.Uri listenUriBaseAddress, System.ServiceModel.Channels.BindingParameterCollection parameters) + 0x7c bytes    

System.ServiceModel.Web.dll!System.ServiceModel.Description.WebScriptEnablingBehavior.AddMetadataEndpoint(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher, bool debugMode) + 0x698 bytes 

System.ServiceModel.Web.dll!System.ServiceModel.Description.WebScriptEnablingBehavior.ApplyDispatchBehavior(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher) + 0x60 bytes