c# - using web references -
so been few days learning web references within projects have came across strange problem.
using simple console app did this:
namespace webservices09004961 { class program { static void main(string[] args) { { convert.converttemperaturesoapclient client = new convert.converttemperaturesoapclient(); while (true) { console.write("enter temperature in celsius: "); double tempc = double.parse(console.readline()); double tempf = client.converttemp(tempc, convert.temperatureunit.degreecelsius, convert.temperatureunit.degreefahrenheit); console.writeline("that " + tempf + " degrees farenheit"); } } } } }
i have added in service reference "convert" related link: http://www.webservicex.net/converttemperature.asmx?wsdl
however error:
an endpoint configuration section contract 'convert.converttemperaturesoap' not loaded because more 1 endpoint configuration contract found. please indicate preferred endpoint configuration section name.
is because can have 1 service reference allocated @ 1 time? reason ask because local service reference within same project build still works fine? yet 1 doesnt? (it did when first created it)
or seperate problem?
also limitations on soap?
this errors common when try remove svc reference , add again. check app/web.config file, should have duplicate entries convert.converttemperaturesoap. remove 1 of them , work fine.
Comments
Post a Comment