Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to run a project in VS2010 that calls 2 web services locally, I have my app.config file set up as below and have added the 2 web services to the Services References but I am getting the following error when I try and step into code in one of the web services.

Just wondering could you help, I know that this error may have appeared here before but the solutions given don’t seem to resolve my issue.

Error message:

Could not find endpoint element with name 'XXXXXX' and contract IcxnService.IIcxnService 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.

App.Config file:


XML
<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IIcxnService" 
                closeTimeout="00:10:00" openTimeout="00:30:00" 
                receiveTimeout="00:30:00" sendTimeout="00:30:00"
                bypassProxyOnLocal="false" transactionFlow="false" 
                hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
                messageEncoding="Text" textEncoding="utf-8" 
                useDefaultWebProxy="true" allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                       maxArrayLength="16384" maxBytesPerRead="4096" 
                       maxNameTableCharCount="16384" />
                <reliableSession ordered="true" 
                       inactivityTimeout="00:10:00" enabled="false" />
                <security mode="Message">
                    <transport clientCredentialType="Windows"  
                               proxyCredentialType="None" realm="" />
                    <message clientCredentialType="Windows" 
                             negotiateServiceCredential="true"
                             algorithmSuite="Default" />
                </security>
            </binding>
            <binding name="WSHttpBinding_ICznzrzctZzzzsService" 
                 closeTimeout="00:10:00" openTimeout="00:10:00" 
                 receiveTimeout="00:10:00" sendTimeout="00:10:00"
                 bypassProxyOnLocal="false" transactionFlow="false" 
                 hostNameComparisonMode="StrongWildcard"
                 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
                 messageEncoding="Text" textEncoding="utf-8" 
                 useDefaultWebProxy="true" allowCookies="false">
                 <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                        maxArrayLength="16384" maxBytesPerRead="4096" 
                        maxNameTableCharCount="16384" />
                 <reliableSession enabled="false"
                        ordered="true" inactivityTimeout="00:10:00" />
                 <security mode="Message">
                     <transport clientCredentialType="Windows" 
                                proxyCredentialType="None" realm="" />
                     <message clientCredentialType="Windows" 
                              negotiateServiceCredential="true"
                              algorithmSuite="Default" />
                 </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    <client>
        <endpoint name="WSHttpBinding_ICznzrzctZzzzsService" 
            address="http://localhost:1600/ContractNotes.svc" 
            binding="wsHttpBinding"
            bindingConfiguration="WSHttpBinding_ICznzrzctZzzzsService" 
            contract="ContractNotes.ICznzrzctZzzzsService" />
        <endpoint name="WSHttpBinding_IIcxnService"
            address="http://localhost:1000/IcxnService.svc" 
            binding="wsHttpBinding"
            bindingConfiguration="WSHttpBinding_IIcxnService" 
            contract="IcxnService.IIcxnService">
            <identity>
                <userPrincipalName value="john@xxxxxxx.COM" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>


What I have tried:

Checked:
********
System.ServiceModel.ServiceContractAttribute(ConfigurationName....to ensure it was correct.

I've added the 2 local web services to my over all project i.e. have main project and 2 web services projects that I reference from the main project. I've set the startup project as the main project and have 2 web services as dependencies and make sure that they are running but I am still getting the same endpoint error issue above.
Posted
Comments
Rishikesh_Singh 14-Apr-16 4:00am    
Since this 2 services a part running in application context, I think you need to add it in config file of your main project.
jcjohnc 14-Apr-16 4:05am    
Hi, it is part of the config file in the main project, that is the snippet above from the config file
Rishikesh_Singh 14-Apr-16 4:16am    
Could you plz put your service contract code also
jcjohnc 14-Apr-16 5:07am    
service contract code? do you know where this is located so I can copy it in.
jcjohnc 14-Apr-16 6:14am    
@Rishikesh_Singh - any update on were the service contract code location is?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900