trinadh
trinadh

Reputation: 137

InvalidOperationException is coming while executing client application

I created a wcf service with namespace as ireader and i generated the service reference in client application using svcutil by passing the namespace parameter as Myapp.ireader and the client app is builded successfully but when i executed the code i am getting the below error. Could not find default endpoint element that references contract 'Myapp.ireader .IireaderService' 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.

Client Configuration file below

  <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="ireaderServiceEndpoint" />
                </basicHttpBinding>
            </bindings>
            <client>
                <endpoint address="http://localhost:19001/ireaderService/ireaderService.svc"
                    binding="basicHttpBinding" bindingConfiguration="ireaderServiceEndpoint"
                    contract="Myapp.ireaderService.IireaderService"
                    name="ireaderServiceEndpoint" />
            </client>
        </system.serviceModel>
    </configuration>

Upvotes: 0

Views: 37

Answers (0)

Related Questions