Search code examples
c#.netweb-serviceswsdl

Connecting to a wsdl in .net


I am trying to connect the following service :

http://api.affiliatewindow.com/v4/AffiliateService?wsdl

I did the following :

  1. Created a new empty web application (c# visual studio 2010)

  2. Right Click on the solution -> add service reference

  3. Pressed "GO"

  4. Changed the name to AffWinAPI and pressed OK

I get the following error : "Failed to generate code for the service reference 'AffWinAPI'. Please check other error and warning messages for details."

I tried the solution suggested in the following and it still haven't worked for me.

Service Reference Error: Failed to generate code for the service reference

What does this WCF error mean: "Custom tool warning: Cannot import wsdl:portType"

Any advice ?


Solution

  • Yes, I got the same error but managed to add it as WebService

    Add Service Reference/Advanced/Add Web Reference
    

    If It asks to save, then save it to a folder and add reference using that file