400 error with Fiddler POST to REST service endpoint
I have a simple REST service endpoint that is failing when I POST using Fiddler 2.  Endpoints that dont require input parameters succeed.  Only passing in data causes failure.  Im using the web server integrated into VS 2010.

Details:

**Global.asax entries**:  
 	

    private void Application_Start(object sender, EventArgs e)
            {
                RegisterRoutes();
            }
     	private void RegisterRoutes()
            {
                RouteTable.Routes.Add(new ServiceRoute("Employee", new WebServiceHostFactory(), typeof(Employee)));
                RouteTable.Routes.Add(new ServiceRoute("Provider", new WebServiceHostFactory(), typeof(Provider)));
            }

**Web Service:**  
 	

    [ServiceContract]
        	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
        	[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
        	public class Provider : BaseMvpWebService<ProviderPresenter>, IProvider
    
    	[WebInvoke(Method="POST", RequestFormat=WebMessageFormat.Json, UriTemplate="", 		ResponseFormat=WebMessageFormat.Json, BodyStyle=WebMessageBodyStyle.Wrapped)]
            public ProviderListWrap FilteredList(GeneralSearchView filtersearch)
    	{ ... }

**Web Config Entries:**  

        <system.serviceModel>
            <standardEndpoints>
              <webHttpEndpoint>
            <!-- 
                Configure the WCF REST service base address via the global.asax.cs file and the default endpoint 
                via the attributes on the <standardEndpoint> element below
            -->
            <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
          </webHttpEndpoint>
        </standardEndpoints>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>     



**Parameter Type Definition:**

     [DataContract]
     public class GeneralSearchView : IGeneralSearchView
     {
        [DataMember]
        public string ProviderListing { get; set; }

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

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

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

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

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

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


**POSTing via Fiddler 2:**  

    POST  http://localhost:19099/Provider/Filtered

**Request Headers**  

    User-Agent: Fiddler
    Content-Type: application\json
    Host: localhost:19099
    Content-Length: 43

**Request Body**  

    {"filtersearch":{"ProviderListing":"True"}}

Any ideas/feedback would be appreciated.
Thanks!




400 error with Fiddler POST to REST service endpoint
===

I have a simple REST service endpoint that is failing when I POST using Fiddler 2.  Endpoints that dont require input parameters succeed.  Only passing in data causes failure.  Im using the web server integrated into VS 2010.

Details:

**Global.asax entries**:  
 	

    private void Application_Start(object sender, EventArgs e)
            {
                RegisterRoutes();
            }
     	private void RegisterRoutes()
            {
                RouteTable.Routes.Add(new ServiceRoute("Employee", new WebServiceHostFactory(), typeof(Employee)));
                RouteTable.Routes.Add(new ServiceRoute("Provider", new WebServiceHostFactory(), typeof(Provider)));
            }

**Web Service:**  
 	

    [ServiceContract]
        	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
        	[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
        	public class Provider : BaseMvpWebService<ProviderPresenter>, IProvider
    
    	[WebInvoke(Method="POST", RequestFormat=WebMessageFormat.Json, UriTemplate="", 		ResponseFormat=WebMessageFormat.Json, BodyStyle=WebMessageBodyStyle.Wrapped)]
            public ProviderListWrap FilteredList(GeneralSearchView filtersearch)
    	{ ... }

**Web Config Entries:**  

        <system.serviceModel>
            <standardEndpoints>
              <webHttpEndpoint>
            <!-- 
                Configure the WCF REST service base address via the global.asax.cs file and the default endpoint 
                via the attributes on the <standardEndpoint> element below
            -->
            <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
          </webHttpEndpoint>
        </standardEndpoints>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>     



**Parameter Type Definition:**

     [DataContract]
     public class GeneralSearchView : IGeneralSearchView
     {
        [DataMember]
        public string ProviderListing { get; set; }

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

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

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

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

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

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


**POSTing via Fiddler 2:**  

    POST  http://localhost:19099/Provider/Filtered

**Request Headers**  

    User-Agent: Fiddler
    Content-Type: application\json
    Host: localhost:19099
    Content-Length: 43

**Request Body**  

    {"filtersearch":{"ProviderListing":"True"}}

Any ideas/feedback would be appreciated.
Thanks!



