Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0
Hi friends .......
 
i am getting a problem while calling a method on WCF service.
Some time this method is running properly.
but some time it shows following exception:-
 

Could not find default endpoint element that references contract 'UpdationWebService.IService1' 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 contract could be found in the client element.

 

In this UpdationWebService is web service name (WCF).
 
I am not getting why it is throwing this exception,........
sometimes it is running properly...
, sometime it is causing Problem...
 
please help me ......., it's urgent
Posted 7-Dec-12 2:00am
Comments
helloworld2020 at 7-Dec-12 7:23am
   
Check your endpoint in configuration file of client. Make sure that everything is correct. Or post your both client and service configuration code, and we can see exactly. Be sure that your service is already in run.
Krunal Rohit at 7-Dec-12 8:49am
   
Delete your reference and App.Config file and try all process again..

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi thanks to all for their valuable replies..
 

Every one suggestions, To check appconfig. was good. I checked, but still it was showing same problem. I solved it by providing Binding to httpBinding and endPointAddress to my ServiceRefrence
 
as follows
 
BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress endPointAddress = new EndpointAddress("http://LocalHos/Service1.svc");
 
ServiceClient sv = new ServiceClient(binding ,endPointAddress );
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 280
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 120
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100