Call the web service via https

What do I need to call a web service via https in C #? Do I need to get a certificate on the site? How to use this to call a web service?

+3
source share
4 answers

There httpsis nothing more special or different from more than calling a web service http. You create a client proxy from WSDL using svcutil.exe (or Add a service link to VS) or wsdl.exe and call the method. The lower levels of HttpWebRequest and HttpWebResponse will ultimately take care of the actual call and certificates, but it should be transparent to your code. Of course, the server hosting the web service must provide a valid certificate.

+4
source

, Visual Studio , . , URL- -, , HTTPS.

( , Visual Studio) node "", - "-". "-", . . . SomethingAPI. API, . intellisense .

+1

, -?

If so, there are different ways to do this depending on the version of .NET you are using. What version are you using, and are you limited in how you can create your client proxy classes?

0
source

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


All Articles