c# - Error using WCF Service Reference using simplified configuration -
i'm building first wcf web service using .net 4.5.1(a web site...not application). when test on local machine can add together service reference project , utilize methods. no errors @ all.
i've configured site using "simplified" configuration
<behaviors> <servicebehaviors> <behavior> <!-- avoid disclosing metadata information, set values below false before deployment --> <!--<servicemetadata httpgetenabled="true" httpsgetenabled="true"/>--> <servicemetadata httpgetenabled="true"/> <!-- receive exception details in faults debugging purposes, set value below true. set false before deployment avoid disclosing exception info --> <servicedebug includeexceptiondetailinfaults="true"/> </behavior> </servicebehaviors> </behaviors>
after publishing site azure can add together service reference , appears work fine. can see methods available in service client object. when test programme uses 1 of methods error saying have multiple endpoints , need phone call them name:
an endpoint configuration section contract 'servicereference1.iservice' not loaded because more 1 endpoint configuration contract found. please indicate preferred endpoint configuration section name.
this offending line of code:
servicereference1.serviceclient mysrv = new servicereference1.serviceclient();
it sounds i've got add together endpoint name:
servicereference1.serviceclient mysrv = new servicereference1.serviceclient("my-endpoint-name");
since simplified configuration creates endpoint names automatically don't know name use. can't find code samples showing how done.
any help much appreciated,
james
c# web-services wcf wcf-endpoint
No comments:
Post a Comment