Haruna Ado
Haruna Ado

Reputation: 47

Error while testing wcf in client test

I'm creating a simple wcf web service that would allow users to pull data from database table. after the implementation If i view the service in a web browser, i would get the page following page

After viewing the service in browser i got the page without error (You have created a service.) without any error. but if i debug mode, i would get the following error.

displayed this page if debugging to run in test client window

I really dont understand where the problem is coming from but im thinking its coming from my config fine but i just cant get where.

here is my web.config file.

<system.serviceModel>
    <services>
        <service behaviorConfiguration="namespaceName.Service1Behavior" name="namespaceName.Service">
            <endpoint address="http://localhost:6937/Service.svc" binding="basicHttpBinding" contract="namespaceName.IService">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="namespaceName.Service1Behavior">
                <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
                <serviceMetadata httpGetEnabled="true" />
                <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
</system.serviceModel>

Upvotes: 1

Views: 38

Answers (1)

krystan honour
krystan honour

Reputation: 6793

I take it you have this in your config file:

<system.web>
  <compilation debug="true" />
<system.web>

Upvotes: 1

Related Questions