Could not find default endpoint element that references contract service

302
Views
3
Answers

Hi, I am calling a WCF web service in my application and I get the following error. Any help please..

Could not find default endpoint element that references contract 'Service.Service' 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.
edit | flag
William Patrick
Asked on: Dec 01, 2011 at 3:22AM

3 Answers

73
4
73
system.serviceModel>
        bindings
>
          wsHttpBinding
>
                binding name
="WSHttpBinding_IAlertComm" closeTimeout="00:01:00"
                    openTimeout
="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal
="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize
="524288" maxReceivedMessageSize="65536"
                    messageEncoding
="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies
="false">

                    reliableSession ordered
="true" inactivityTimeout="00:10:00"
                        enabled
="false" />
                    security mode
="Message">

                        message clientCredentialType
="Windows" negotiateServiceCredential="true"
                            algorithmSuite
="Default" />
edit | flag
William Patrick
Answered on: Dec 01, 2011 at 3:23AM
74
4
74

above is the service model I used.

edit | flag
William Patrick
Answered on: Dec 01, 2011 at 3:24AM
75
8
75

This sounds silly but it works!!
If you add the service to a Class Library it wont work out the box, copy the system.serviceModel section from the app.config in your library project and put it in your web.config
Good luck!!

edit | flag
Gokul A
Answered on: Dec 01, 2011 at 3:25AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags