Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7727067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:22:00+00:00 2026-06-01T05:22:00+00:00

I created a Ajax enabled WCF service. I can consume the service from javascript

  • 0

I created a “Ajax enabled WCF service”. I can consume the service from javascript code and the WebService works as intended. But, I want to write ATP’s around it. So, I am adding the webservice as a “Service Reference” into my ATP Project. Then I am using calling the webservice as usual. It all compiles fine. But when I run the ATP, it throws me back this error

“System.InvalidOperationException : Could not find endpoint element with name ‘ServiceReference1.IWCFService’ and contract ‘ServiceReference1.IWCFService’ 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.”

This is what I have in my App.config file of the ATP.

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IWCFService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://yashworkspace/BSS/WS/ServiceReference1.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWCFService"
            contract="ServiceReference1.IWCFService" name="BasicHttpBinding_IWCFService" />
    </client>
<services>
    <service name="ServiceReference1.WCFService">
        <endpoint address="http://yashworkspace/BSS/WS/ServiceReference1.svc" behaviorConfiguration="org.proj.WebServices.WCFServiceAspNetAjaxBehavior"
                binding="webHttpBinding" contract="org.proj.WebServices.IWCFService" />
    </service>
</services>
<behaviors>
    <endpointBehaviors>
        <behavior name="org.proj.WebServices.WCFServiceAspNetAjaxBehavior">
            <enableWebScript />
        </behavior>
    </endpointBehaviors>
    <serviceBehaviors>
        <behavior name="">
            <serviceMetadata httpGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
    </serviceBehaviors>
</behaviors>
</system.serviceModel>

Please let me know what could have gone wrong??
I have a normal WCF Service and that is working totally fine.

Please help.

regards
Yash

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:22:01+00:00Added an answer on June 1, 2026 at 5:22 am

    The above answer from Drew Marsh is partially right. But the main issue is solved as follows.
    Additionally,
    Here the issue is, when u expose the WCF as a ajax enabled WCF service, it communicates using JSON. When you are calling the same service from a C# code, it called it using a SOAP request. So you need to configure your service such that it accepts both JSON and SOAP requests. So, in the services section, you need to configure it as follows

    <services>
          <service name="ServiceReference1.WCFService">
              <endpoint address="" behaviorConfiguration="org.proj.WebServices.WCFServiceAspNetAjaxBehavior"
                binding="webHttpBinding" contract="org.proj.WebServices.IWCFService"  />
              <endpoint address="soapreq" behaviorConfiguration="org.proj.WebServices.MyServiceSOAPBehaviour" bindingConfiguration="BasicHttpBinding_IUpdateService"
                      binding="basicHttpBinding" contract="org.proj.WebServices.IWCFService" name="ServiceReference1.IWCFService" />
          </service>
      </services>
    

    In the behaviors section, you need to configure your endpoint behaviors as follows..

    <endpointBehaviors>
              <behavior name="org.proj.WebServices.WCFServiceAspNetAjaxBehavior">
                  <enableWebScript />
              </behavior>
              <behavior name="org.proj.WebServices.MyServiceSOAPBehaviour">
              </behavior>
          </endpointBehaviors>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an AJAX-enabled WCF service to return a List<> of a custom
In Visual Studio 2010 I created a new Ajax enabled WCF Service [ServiceContract(Namespace =
I created a simple AJAX-enabled WCF service based on the MSDN tutorial [ServiceContract(Namespace =
I have created an Ajax enabled WCF web service that contains this simple method:
I'm using a simple ajax-enabled WCF service. I'm creating a string of XML on
Have created simple Ajax enabled contact forms before that have around 12 fields -
I have an AJAX-enabled SharePoint 2007 site. I have also created a user control
I'm trying to create an Ajax enabled webform, and have created a simple page.
I created a number of standard WCF Services (Service Contract and Host (svc) are
I have set up some WCF services that I use to call from javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.