How to add a service link to a WCF client for a web service that requires a client authentication certificate

Caution notice WCF noobie

I need to create a WCF client to request a web service that does not use WCF. The web service is not a WCF service. In addition, the web service requires a client authentication certificate. Now I have a certificate and you can create a client that is not WCF, which works fine; I was able to “Add Web Link” and the certificate dialog box opened so that I could select the appropriate certificate and then created the web link. Attempting to create a WCF client using the “Add Service Link” is another story; it just fails with the "Access Error" 403 error.

I have a WSDL for the service and the svcutil.exe file is running on it, but I'm not sure how from there from there.

Thanks for any help!

+3
source share
3 answers

I assume that the service you are using is performing SSL client authentication.

Since the link to the service is not working, you can use svcutil to create the client from the WSDL file that you have. I think the syntax would be something like this:

svcutil *.wsdl /l:C# /out:Reference.cs /config /s /ct:System.Collections.Generic.List`1 /ser:Auto /tcv:Version35 /n:*,<NameOfYourNamespaceHere> /edb

Reference.cs, ( ). . , output.config. , .

MSDN, . , , , .

.

+3

, , , , Add service WSDL, . . :

  • URL WSDL
  • URL-
  • URL- , /mex
  • WSDL

, WSDL, XSD , . , " " "", .

+3

(): , , , WSDL (, , XSD)? , , ( )?

, WSDL ( XSD) , WCF- ( svcutil.exe Add Service Reference) , .

... ( $0,02?)

0

Source: https://habr.com/ru/post/1715256/


All Articles