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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:03:41+00:00 2026-06-12T21:03:41+00:00

During the last 4 hours i’ve been looking at any post I could find

  • 0

During the last 4 hours i’ve been looking at any post I could find regarding this question, so I might be a little blind by now 😉

I am trying to call a simple WCF service using jQuery. I’ve been using WebMethods for some time, and I am trying to migrate some. I am trying to test with the most simple webservice you can imagine:

[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class ForumOperationService : IForumOperationService
{
    public string Horse(string prefixText, int count)
    {
        return "hestWCF";
    }
}

My jQuery call:

 $(document).ready(function () {
            var hest;
            $.ajax({
                type: "POST",
                datatype: "application/json",
                url: "Services/ForumOperationService.svc/Horse",
                data: { prefixText: 'a', count: 10 },
                success: function (data) {
                    hest = data;
                }
            });
        });

My web.config is like this:

 <system.webServer>
    <behaviors>
      <endpointBehaviors>
        <behavior name="ServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="ForumOperationService">
        <endpoint address="" behaviorConfiguration="ServiceAspNetAjaxBehavior"
            binding="webHttpBinding" contract="IForumOperationService" />
      </service>
    </services>
    .... (more stuff)

In Firebug I get the following error:

NetworkError: 500 Internal Server Error –
http://localhost:21599/Client/Services/ForumOperationService.svc/Horse

Any ideas?

UPDATE:

Just ran the WCF Test Client, and got this error:

The service class of type ForumOperationService both defines a
ServiceContract and inherits a ServiceContract from type
IForumOperationService. Contract inheritance can only be used among
interface types. ÿIf a class is marked with ServiceContractAttribute,
it must be the only type in the hierarchy with
ServiceContractAttribute. ÿConsider moving the
ServiceContractAttribute on type IForumOperationService to a separate
interface that type IForumOperationService implements.

Will follow up tomorrow.

  • 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-12T21:03:43+00:00Added an answer on June 12, 2026 at 9:03 pm

    Test the method using WCFTestClient(.exe) and confirm that method is working fine, you will get actual error if not.

    If your method params easy enough, WCFTestClient is quick way to test out before start using it from application code.

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

Sidebar

Related Questions

I've spent the last 2 hours on this and I've probably read every question
I've been working on this issue for the last few hours and it has
I have been using stackoverflow vastly during the last year - an excellent source
I've been working on this app for the last few days and suddenly this
This is a fantastic resource and I have been using it extensively during my
During last three days I have been trying to solve Project Euler 15 in
Here is a problem which is annoying me during these last two hours. I
I have faced this problem quite often during the last couple of months, during
I apologize in advance for asking a question that might be a little more
I've been discovering Ruby on Rails during the last 3 months and I'm fascinated.

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.