Search code examples
c#webservicewsdlasmx

Visual Studio 19. Don't add webasm service


I am trying to connect a web service(see http://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx?wsdl ) using the VS 2019 menu "Add Service Reference" as an asmx web service. The service is determined, a list of methods appears, but after adding the "Web service reference", a message appears after a while "Unable to download file from http://...?wsdl" Continue or Cancel. After continue created .disco file , and reference file , but it is empty! How to solve the problem?


Solution

  • There are two options, "Add Web Reference" and "Add Service Reference". The former is for old-fashion asmx (like cbr service is) and the latter is for WCF. Use "Add Web Reference" to add reference to that service and this will work. There are multiple tutorials and examples on the internet which shows how to use cbr: