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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:41:00+00:00 2026-06-10T07:41:00+00:00

I have a WCF Rest service that i am try to test with the

  • 0

I have a WCF Rest service that i am try to test with the Firefox Rest Client,

The signature of the method i am calling is

        [WebInvoke(Method = "POST", UriTemplate = "UploadEvidenceData/{userName}/{password}/{cdb}")]
    public EvidenceData UploadEvidenceData(string userName, string password, string cdb, EvidenceData evidence)

The Data Contract for evidence is

    [DataContract(Name = "EvidenceData", Namespace = "http://StudentEvidence.com")]
public class EvidenceData
{
    [DataMember]
    public string LearnerID { get; set; }

    [DataMember]
    public string UnitID { get; set; }

    [DataMember]
    public string AssessorID { get; set; }

    [DataMember]
    public int MethodO { get; set; }  //int

    [DataMember]
    public int MethodEwt { get; set; }  //int

    [DataMember]
    public int MethodEp { get; set; }  //int

    [DataMember]
    public int MethodQc { get; set; }  //int

    [DataMember]
    public int MethodEps { get; set; }  //int

    [DataMember]
    public int MethodPd { get; set; }  //int

    [DataMember]
    public int MethodS { get; set; }  //int

    [DataMember]
    public int MethodEwa { get; set; }  //int

    [DataMember]
    public int MethodEch { get; set; }  //int

    [DataMember]
    public int MethodEwe { get; set; }  //int

    [DataMember]
    public int MethodApel { get; set; }  //int

    [DataMember]
    public int EvidenceID { get; set; }  //int

    [DataMember]
    public string EvidenceFileName { get; set; }

    [DataMember]
    public int EvidenceFileSize { get; set; }  //int

    [DataMember]
    public string EvidenceDescription { get; set; }

    [DataMember]
    public string AssessorFeedback { get; set; }

    [DataMember]
    public string Signature { get; set; }

    [DataMember]
    public int RequirementID { get; set; }  //int

    [DataMember]
    public int ModuleID { get; set; }  //int

    public EvidenceData()
    {
        this.LearnerID = string.Empty;
        this.UnitID = string.Empty;
        this.AssessorID = string.Empty;
        this.MethodO = 0;
        this.MethodEwt = 0;
        this.MethodEp = 0;
        this.MethodQc = 0;
        this.MethodEps = 0;
        this.MethodPd = 0;
        this.MethodS = 0;
        this.MethodEwa = 0;
        this.MethodEch = 0;
        this.MethodEwe = 0;
        this.MethodApel = 0;
        this.EvidenceID = 0;
        this.EvidenceFileName = string.Empty;
        this.EvidenceFileSize = 0;
        this.EvidenceDescription = string.Empty;
        this.AssessorFeedback = string.Empty;
        this.Signature = null;
        this.RequirementID = 0;
        this.ModuleID = 0;
    }
}

and when i use the client use the address http://something.com/Service/UploadEvidence/user/pass/mydb

and in the body i put

{"AssessorFeedback":"Nothing to report","AssessorID":"32fac8c2-0f9b-4cad-a2e4-55b06e968da0","EvidenceDescription":"some evidence","EvidenceFileName":"Lighthouse.jpg","EvidenceFileSize":561276,"EvidenceID":0,"LearnerID":"61b9eca6-6c3e-4bd3-8963-69d9ad3e5eeb","MethodApel":0,"MethodEch":0,"MethodEp":0,"MethodEps":0,"MethodEwa":0,"MethodEwe":0,"MethodEwt":0,"MethodO":0,"MethodPd":0,"MethodQc":0,"MethodS":0,"ModuleID":1131,"RequirementID":30476,"Signature":null,"UnitID":"c33ea6e1-ac54-46dc-a512-3a2efafd5a0b"}

and i have custom header of application/json

This all works fine from a .net client, but not from the rest client plugin of firefox 400 everytime.

any help is very much appreciated

Don

My Web config File

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <httpRuntime maxRequestLength="2147483647"/>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
  </system.webServer>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <standardEndpoints>
      <webHttpEndpoint>
        <standardEndpoint name=""
                          helpEnabled="true"
                          automaticFormatSelectionEnabled="true"
                          defaultOutgoingResponseFormat="Json"
                          maxReceivedMessageSize="2147483647"
                          maxBufferSize="2147483647"
                          transferMode="Buffered" />

      </webHttpEndpoint>
    </standardEndpoints>
    <services></services>
  </system.serviceModel>
</configuration>
  • 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-10T07:41:02+00:00Added an answer on June 10, 2026 at 7:41 am

    400 often means wrong Http method. Does the Firefox client use GET (which would require a different attribute on your method, and a tweak to your web.config to allow web get), or are you certain it’s POST?

    Also, check this content-type issue: Why does my C# client, POSTing to my WCF REST service, return (400) Bad Request?

    Also see if adding RequestFormat = WebMessageFormat.Json to the [WebInvoke] attribute decorating your service method helps. I think this defaults to xml, which is probably what the .NET client sends. http://msdn.microsoft.com/en-us/library/system.servicemodel.web.webinvokeattribute.requestformat.aspx

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

Sidebar

Related Questions

I have a WCF Rest service: [WebHelp(Comment = Sample description for GetData)] [WebInvoke(Method=POST, UriTemplate
My WCF REST service method: [WebInvoke(Method = POST, ResponseFormat = WebMessageFormat.Xml)] Metadata[] Extract(Stream stream);
I have a WCF WebApi Rest service that has the following endpoints: [WebGet(UriTemplate =
I have a REST WCF service that has a method that gets a parameter
I have a WCF rest service. It has a method that returns a list
I have made a REST Web service, that works with Visual Studios WCF Test
I have an asp.net 4 application that hosts a WCF REST service via WebServiceHost...
I have a C# REST Service in WCF that sits on top of an
I have a REST service consumed by a .Net WCF client. When an error
I have an old WCF 3.5 RESTful service that was at: http://www.mydomain.com/rest/Service.svc I have

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.