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

  • Home
  • SEARCH
  • 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 8695591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:04:42+00:00 2026-06-13T01:04:42+00:00

I have a simple web service I have created. I’m using Visual Studio 2012

  • 0

I have a simple web service I have created. I’m using Visual Studio 2012 .NET 4.5.

Here is the service contract:

using System.Runtime.Serialization;
using System.ServiceModel;

namespace GEMS.Core.WCFService
{
    [ServiceContract]
    public interface IMenuService
    {
        [OperationContract]
        void AddMenuItem(string menuId, string parentId, string title, string description, string url);
        [OperationContract]
        void UpdateMenuItem(string menuId, string parentId, string title, string description, string url);
        [OperationContract]
        void DeleteMenuItem(string menuId);
        [OperationContract]
        MenuEntry[] GetAllMenuItems();
    }

    [DataContract]
    public class MenuEntry
    {
        [DataMember]
        public string MenuId { get; internal set; }
        [DataMember]
        public string ParentId { get; internal set; }
        [DataMember]
        public string Title { get; internal set; }
        [DataMember]
        public string Description { get; internal set; }
        [DataMember]
        public string Url { get; internal set; }
    }
}

The relevant portion of the app.config is:

<system.serviceModel>
  <services>
    <service name="GEMS.Core.WCFService.MenuService">
      <host>
        <baseAddresses>
          <add baseAddress="http://localhost:8020/GEMS.Core.WCFService/MenuService/" />
        </baseAddresses>
      </host>
      <endpoint address="" binding="basicHttpBinding" contract="GEMS.Core.WCFService.IMenuService" >
        <identity>
          <dns value="localhost"/>
        </identity>
      </endpoint>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior>
        <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
        <serviceDebug includeExceptionDetailInFaults="False" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

I publish it to my IIS server (local to my box).

In the client app, I create a service reference. When I click Discover, it finds:

http://localhost:8020/GEMS.Core.WCFService/MenuService/mex

When I run my client, however, I get the following message:

There was no endpoint listening at:
http://localhost:8020/GEMS.Core.WCFService/MenuService/ that could
accept the message. This is often caused by an incorrect address or
SOAP action. See InnerException, if present, for more details.

The inner exception merely says that it got a 404 error from the web server.

The client’s .config file has the following auto-generated xml:

<system.serviceModel>
  <bindings>
    <basicHttpBinding>
      <binding name="BasicHttpBinding_IMenuService" />
    </basicHttpBinding>
  </bindings>
  <client>
    <endpoint address="http://localhost:8020/GEMS.Core.WCFService/MenuService/"
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMenuService"
      contract="WCF_MenuService.IMenuService" name="BasicHttpBinding_IMenuService" />
  </client>
 </system.serviceModel>

I’ve been going around in circles for hours and can’t figure out what I’ve got glitched up, but surely I’ve done somethign wrong.

Not sure that it matters, but the client is an ASP.NET MVC app.

  • 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-13T01:04:43+00:00Added an answer on June 13, 2026 at 1:04 am

    As Pete explained Newtonsoft.json.dll causes client to not generate the service code. You can either delete the dll and then add the service reference again.

    Or you can do try following solution that worked for me. When you add a service reference,

    1. Click on the ‘Advanced…’ button in the ‘Add service reference’ – window
    2. Disable ‘Reuse types in referenced assemblies’.

    Then your classes should be generated.

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

Sidebar

Related Questions

What I have created a very simple asp.net web service using .NET framework 3.5,
I have created a C# web service using visual studio to stop the windows
I have a very simple ASP.NET web application created under Visual Studio 2008 (SP1),
I have created a simple web-service using Java. i want to load jars related
Trying to do basic SSL-authenticated Web Service using Visual Studio 2008 .NET 3.5 Service
I have created simple .NET Web Service (ASMX) that I call from my .NET
i have created a simple web service using Php Nusoap. its working correctly but
I have created the simple web service. Code: [ServiceContract] public interface ITsdxService { [OperationContract]
Could someone help me on this, I have created simple web services using axis2
I have created a WCF web service, i am calling it from ASP.NET 1.1

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.