Reputation: 1
i just wanna add bindingExtensions , i dont know what should i write in type attribute when add bindingExtensions. this is my config :
<system.serviceModel>
<extensions>
<bindingExtensions>
<add name="MaxClockSkewBinding" type="Microsoft.ServiceModel.Samples.MaxClockSkewBinding, MaxClockSkewBinding,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bindingExtensions>
</extensions>
<bindings>
<customBinding>
<binding name="MaxClockSkewBinding">
<transactionFlow />
<security authenticationMode="SecureConversation">
<secureConversationBootstrap authenticationMode="UserNameOverTransport">
<localClientSettings maxClockSkew="00:30:00" />
</secureConversationBootstrap>
<localClientSettings maxClockSkew="00:30:00" />
</security>
<httpsTransport />
</binding>
</customBinding>
when i run my program , error is :
Configuration binding extension 'system.serviceModel/bindings/MaxClockSkewBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly
and this is how i use my service :
channelFactory = new ChannelFactory<TProxy>("*");
channelFactory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
//channelFactory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck;
//channelFactory.Credentials.ClientCertificate.Certificate = new X509Certificate2(Certificate, CertificatePass);
channelFactory.Credentials.UserName.UserName = UserName;
channelFactory.Credentials.UserName.Password = PassWord;
var proxy = (IClientChannel)channelFactory.CreateChannel();
Upvotes: 0
Views: 782
Reputation: 9478
In Visual Studio open Tools > WCF Service Configuration Editor
:
It can help you a lot with creating new WCF service configs and editing an existing one.
Upvotes: 0