다음을 통해 공유


WCF: Create client proxy – For WCF service running on SSL – with client certificate

WCF: Create client proxy – For WFC service Running On SSL – With Client Certificate

 

Problem: We can’t use the default svcutil.exe to pass the client certificates.

 

Resolution:

So we have two work around.

1) Use the modified svcutil.config file and add the required client certificate in same.

https://msdn.microsoft.com/en-us/library/aa395212.aspx

 

2) We can use Credential Manager to set the default client certificate and use svcutil.exe in normal way.

We can understand the Credential manager as a generic place to store our commonly used credentials.

Application layer can access this store to get the required user credentials, can be user name , password or certificates.

 

MSDN link for more understanding:

https://msdn.microsoft.com/en-us/library/aa374789.aspx

 

Kind of credentials supported: https://msdn.microsoft.com/en-us/library/aa380517.aspx

 

Once we set the required client certificate in credential manager, we can use the svcutil.exe to create the proxy.

 

Select – Add a certificate-based credentials

 

Click on – Select a client certificate and provide the network address

 

We are done …

 

svcutil.exe is act just like a normal client application, who request for client certificate and Credential manager provides the same and we are able to generate the proxy classes.

“Applications use Credentials Management functions to prompt users for application-defined, generic, credential information, such as user name, certificate, smart card, or password. The information entered by the user is returned to the application for authentication.”

 

Hope this help in using svcutil.exe to create proxy classes, when WCF service runs over SSL and requires client certificates.