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 6321059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:05:00+00:00 2026-05-24T16:05:00+00:00

I have created WCF service in project. Now using Jquery I am successfully able

  • 0

I have created WCF service in project. Now using Jquery I am successfully able to consume service, but when I tried to add service as web reference in windows application, I am unable to invoke it. If I create simple service, I can successfully invoke in windows application, but if I do changes to invoke service for jquery, which I found by doing some Google search. I don’t know where I am missing.

Below is the code, I have done.
This is the interface for WCF.

[ServiceContract]
public interface ITestService
{
    [OperationContract]
    void DoWork();

    [OperationContract]
    [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]    
    string HelloWorld();
}

Class invoking Interface

    public class TestService : ITestService
{
    public void DoWork()
    {
    }


    public string HelloWorld()
    {
        return "Hello World";
    }
}

}

and here is the web config for the application.

<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="TestWCFBehavior">
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="TestWCFBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>

    <!--<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />-->
  <services>
    <service name="WebAppWithWCF.TestService" behaviorConfiguration="TestWCFBehavior">
      <endpoint address="" binding="webHttpBinding" contract="WebAppWithWCF.ITestService" behaviorConfiguration="TestWCFBehavior"/>
    </service>
  </services>
</system.serviceModel>

I have done some try and error, but couldn’t found a way till now…

Please help… and let me know if any information is missing from my side.

  • 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-05-24T16:05:01+00:00Added an answer on May 24, 2026 at 4:05 pm

    The webHttpBinding does not expose metadata and thus you cannot add a reference to it.

    Basically, the Add Service Reference feature generates proxies and classes based on what is known of the service (exposed via metadata / WDSL).

    Services with wsHttpBinding or basicHttpBinding both expose your service’s metadata. They are usually used when you’re building a .NET to .NET client-server application.

    Implementing both binding: WCF Service with webHttpBinding-basicHttpBinding-wcHttpBinding

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF web service called Palladium that is created as a project
I have created a WCF service in my project and I have some classes
I have created a new WCF service library type project. I have created a
I have created a simple wcf service which used the WCF Service Library template.
I have created a basic WCF service in IIS. I am aware that this
I have created a reference to an IIS hosted WCF service in my ASP.NET
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a WCF Service Library in VS2010 and can run the service
This is real simple. I have a wcf service (nothing fancy, just New Project->
To pass the culture information from client to WCF service, I have created a

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.