WCF Service Testing issue with Could not find default endpoint element that references contract 'ServiceReference1.ProcessItinerary' in the ServiceModel client configuration section This might be because no configuration file was found for your app

Topics: General Discussion Forum, July and December Releases Forum, Service Factory Modeling Edition Forum
Aug 20, 2010 at 4:20 PM
Edited Aug 20, 2010 at 4:22 PM

Hi All,

Please help me to how to fix this problem. I am using VSTS 2008 to do the - WCF services Performance Testing hosted on Biztalk Server.

I am having the same problem when I do WCF load testing i.e I have a created unit tests and the unit test working fine with out any error. Its showing the error only when I am running the loadtest and the error as follows:

Steps I did before I did: I Created web test with C# project and added a "Service Refference" thena after I completed the required code in UnitTest.cs. I debigged and executed the test with out any issues. Now I added the load test from new item. When I run the load test its started to spit the error as posted below.

 

Error when I run the load test :-- TestProject1.GetIndividualPolicyHolderInfo.TestMethod1 threw exception:  System.InvalidOperationException: Could not find default endpoint element that references contract 'ServiceReference1.ProcessItinerary' 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.

App.Config file that is working for unit test and the same is using for load test as well :-

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
                <binding name="CustomBinding_ITwoWayAsync" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://required url"
                binding="netTcpBinding" bindingConfiguration="CustomBinding_ITwoWayAsync"
                contract="ServiceReference1.ProcessItinerary" name="CustomBinding_ITwoWayAsync" />
        </client>
    </system.serviceModel>
</configuration>

Developer
Aug 25, 2010 at 11:22 AM
Edited Aug 25, 2010 at 11:25 AM

HI,

This is a likely endpoint lookup issue frolm your client code (in this case, your test loader).

Some areas to verify:

- Your contract should reference the full type name (with full namespace).

- Your client config file should be located in your main client exe app location and be named like: appName.exe.config (sometimes this error is because the config file cannot be located, in thios case from your test runner)

- You can also consider some WCF load testing tools like, http://wcfloadtest.codeplex.com/  (sample use: http://wcfloadtest.codeplex.com/Thread/View.aspx?ThreadId=66339)

Regarding these topics, feel free to ask in the WCF forums (http://social.msdn.microsoft.com/Forums/en/wcf/threads/) or the Biztalk forums (http://social.msdn.microsoft.com/Forums/en-US/category/biztalkserver)

Regards,

Hernan