2012-03-27 24 views
1

こんにちはSSL設定バインディング拡張「system.serviceModel /バインディング/ clearUsernameBinding」が見つかりませんでした

http://webservices20.blogspot.in/2008/11/introducing-wcf-clearusernamebinding.html

せずに私のWCFサービスの認証を行うために、この記事を使用するトリングですが、私はこのエラーをgetingています

<system.serviceModel> 
<extensions> 
    <bindingExtensions> 
    <add name="clearUsernameBinding" type="ClearUsernameCollectionElement, ClearUsernameBinding" /> 
    </bindingExtensions> 
</extensions> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="ServiceBehavior"> 
     <serviceCredentials> 
     <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="MyValidator,App_Code"/> 
     </serviceCredentials> 

     <!--To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment--> 
     <serviceMetadata httpsGetEnabled="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> 
    <behavior name="SampleServiceBehaviour"> 
     <serviceMetadata httpsGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
     <serviceCredentials> 
     <userNameAuthentication userNamePasswordValidationMode="Custom" 
     customUserNamePasswordValidatorType="MyUserNameValidator, App_Code" /> 
     </serviceCredentials> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<services> 
    <service name="Service" behaviorConfiguration="SampleServiceBehaviour"> 
    <endpoint address="~/QuadraService/Service.svc" binding="wsHttpBinding" contract="IService" bindingConfiguration="Binding1"/> 
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> 
    <endpoint binding="clearUsernameBinding" bindingConfiguration="myClearUsernameBinding" contract="IService" /> 
    </service> 
</services> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> 
<bindings> 

    <clearUsernameBinding> 
    <binding name="myClearUsernameBinding" 
messageVersion="Soap12"> 
    </binding> 
    </clearUsernameBinding> 

    <wsHttpBinding> 

    <binding name="Binding1"> 
     <!-- UsernameToken over Transport Security --> 
     <security mode="TransportWithMessageCredential" > 
     <message clientCredentialType="UserName"/> 
     </security> 
    </binding> 
    </wsHttpBinding> 



</bindings> 

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
Parser Error Message: Configuration binding extension 'system.serviceModel/bindings/clearUsernameBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly. 
:私がコンパイルしようとすると、 0

助けてください

+0

エラーは実際にはかなり明確です。 web.config/app.configまたは設定コードをチェックして、WCFバインディング拡張が正しく設定されていることを確認してください。設定をあなたの質問に入れれば助けになるでしょう。 –

+0

@SixtoSaez返信ありがとうございます。私は質問の設定コードを追加しました。 – Sunny

+0

私は設定ファイルをチェックして問題を解決しましたが、別のエラーが表示されるようになりました: - "メッセージのセキュリティを確認する際にエラーが発生しました。クライアント側でサービスを使用しようとすると – Sunny

答えて

0

クライアント上の構成ファイルを手動で変更していないため、「メッセージのセキュリティを検証するときにエラーが発生しました」という例外が表示されているようです。

作者がコメントに次のように述べている:デスクトップアプリケーション用として

、クライアントは、サンプルコンソールアプリケーションで行われるように手動 clearUsernameBindingを設定する必要があります。 の理由は、clearUsernameBinding dllが.Net 3.5 の一部ではなく、クライアント側にデプロイする必要があるということです。

関連する問題