Dit is mijn eerste keer dat ik met webservices werk, maar ik heb een vaker voorkomende error.
Ik heb van mijn stagebedrijf toegang gekregen tot een webservice. Het invoegen lukt me gewoon. Alleen wanneer ik een object wil aanmaken van de client zodat ik de functies kan gebruiken krijg ik een error tijdens runtime.
Ik krijg deze error:
Could not find endpoint element with name 'BasicHttpBinding_IQCBWService1' and contract 'QCBWReference.IQCBWService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
Dit is de inhoud van me app.config:
Weet iemand de oplossing? Heb al geprobeerd time out, buffersizes, reading quotas en dergelijke toe te voegen. Krijg het niet voor elkaar.
Heb het zowel in VS2010 als in VS2013 geprobeerd.
Ik heb van mijn stagebedrijf toegang gekregen tot een webservice. Het invoegen lukt me gewoon. Alleen wanneer ik een object wil aanmaken van de client zodat ik de functies kan gebruiken krijg ik een error tijdens runtime.
C#:
15
16
17
18
| public RemoteController() { qc = new QualityControl(); qcbw = new QCBWServiceClient("BasicHttpBinding_IQCBWService1"); } |
Ik krijg deze error:
Could not find endpoint element with name 'BasicHttpBinding_IQCBWService1' and contract 'QCBWReference.IQCBWService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
Dit is de inhoud van me app.config:
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IQCBWService" /> <binding name="BasicHttpBinding_IQCBWService1"> <security mode="Transport" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://some.uri/QCBWService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IQCBWService" contract="QCBWReference.IQCBWService" name="BasicHttpBinding_IQCBWService" /> <endpoint address="https://some.uri/QCBWService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IQCBWService1" contract="QCBWReference.IQCBWService" name="BasicHttpBinding_IQCBWService1" /> </client> </system.serviceModel> |
Weet iemand de oplossing? Heb al geprobeerd time out, buffersizes, reading quotas en dergelijke toe te voegen. Krijg het niet voor elkaar.
Heb het zowel in VS2010 als in VS2013 geprobeerd.
[ Voor 1% gewijzigd door Woy op 07-10-2015 15:29 . Reden: url verwijderd ]