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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:16:48+00:00 2026-05-23T08:16:48+00:00

I have a WCF rest service with two OperationContracts as follows: [OperationContract] [WebGet(UriTemplate =

  • 0

I have a WCF rest service with two OperationContracts as follows:

    [OperationContract]
    [WebGet(UriTemplate = "ping/")]
    Message PingServer();

    [OperationContract]
    [WebGet(UriTemplate = "files/")]
    Message AddFile(string accessKey);

When I visit http://localhost/rest.svc/ping/ it works fine and if I visit http://localhost/rest.svc/files/ it works fine.

However, if I visit http://localhost/rest.svc directly, it throws the following error:

System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
contract: http://tempuri.org/:IRest —-> System.InvalidOperationException: The operation ‘AddFile’ could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of parameters.

I understand the error, but was wondering how to fix/suppress it so it shows the default WCF endpoint page. I am just using WCF for REST only.

Thanks!

Jeffrey Kevin Pry

  • 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-23T08:16:49+00:00Added an answer on May 23, 2026 at 8:16 am

    This is a problem where the WSDL engine is attempting to generate a description for your service and it’s unable to because the service contract you’ve defined wouldn’t normally work for RPC style endpoints which the WSDL engine is made to process. This is why you get the error you’re seeing about Message not being able to be mixed with typed parameters. You should configure the service with <serviceMetadata httpGetEnabled="false" /> because WSDL and REST just don’t play together.

    If you are expecting any other kind of “help” page for a REST service perhaps you’re thinking of the <serviceDebug httpHelpPageEnabled="true" />?

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

Sidebar

Related Questions

I have a WCF WebApi Rest service that has the following endpoints: [WebGet(UriTemplate =
So I have wcf rest service which succesfuly runs from a console app, if
If I have a wcf rest service such as http://somedomain.com/service.svc/uniqueid/somemethod/parameter1 then is there a
We have a ASP.NET application running and i have added a WCF Rest service
I have an asp.net 4 application that hosts a WCF REST service via WebServiceHost...
I have ASP MVC 3 application. I created WCF REST JSON Service and added
I have a REST service consumed by a .Net WCF client. When an error
I have a C# REST Service in WCF that sits on top of an
I am working on a WCF REST service, and in the service I have
I have trying to design a REST service in .NET 3.5 with WCF REST

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.