.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Overload POST with X-HTTP-Method-Override as DELETE

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :WCF
Hi, How do I pass POST with the override header, X-HTTP-Method-Override, which will say I really mean DELETE in REST WCF 3.5? What changes are needed exactly in server side REST code & where to make those changes exactly? Can some one post code snippet? Thanks!

View Complete Post

More Related Resource Links

create web service with http-post method


hi All,

we need to expose a web service to the 3rd party vendor which can only call using POST protocol, NOT SOAP.

So my question, is it better to build a web service or just simply .aspx page?

Also is there any best practice documentation on this.



No overload for method 'Delete' takes 3 arguments



[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
     public bool DeleteProduct(int original_ID, string original_Priimek)


    Guid original_UserId = Guid.NewGuid();

    int rowsAffected = Adapter.Delete(original_ID, original_UserId, original_Priimek);

   // Return true if precisely one row was deleted, otherwise false
   return rowsAffected == 1;

string original_Priimek - not found

Please help

How do I use x-http-method-override for a REST service in WCF 4.0


Back in WCF 3.5 using the WCF REST Starter Kit, I was able to create a request interceptor to handle x-http-method-override headers for clients that cannot send PUT or DELETE commands.  How do I do the equivalent in WCF 4.0?

HTTP Post and WebService


I am working on a application which will accept the data in the post request. My application also wants to expose a web service and want to call another web service. Considering all these 3 action that I want to do, can I create a single application which will have a web form which will accept the POST request and expose a web service at the same time.

Although it may be possible to achieve this, Is this a correct way of doing it?

MySqlMembershipProvider.CreateUser no suitable method found to override



I am getting following error while using MySqlMembership Provider. Can any one help me to solve this?


MySql.Membership.MySqlMembershipProvider.CreateUser(string, string, string, string, string, bool, object, ref System.Web.Security.MembershipCreateStatus)': no suitable method found to override.

        <membership defaultProvider="MySQLMembershipProvider">
                <add name="MyMembershipProvider"

        <roleManager enabled="true" defaultProvider="MySQLRoleProvider" />

using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Configuration.Provider;
using System.Data;
using System.Diagnostics;
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Web;
using System.Web.Configuration;
using System.Web.Security;
using MySql.Data.M

HTTP verb POST used to access path ' ' is not allowed



Im new to ASP.NET MVC 2.

Im trying to call a controller method using Jquery $.ajax().

---- inside Controllers/ServiceController

public string GetString()


        return "My First MVC Ajax Testing";


---- javascript code calling the controller method

    var serviceUrl = '~/Controllers/ServiceController/GetString';

    var jsonData = '';


        url: serviceUrl,

        type: 'POST',

        data: JSON.stringify(jsonData),

        dataType: 'json',

        beforeSend: function (XMLHttpRequest) {



        success: function (data, textStatus, XMLHttpRequest) {

            onSuccess(data, textStatus, XMLHttpRequest);


        error: function (XMLHttpRequest, textStatus) {


How do I get the http method?



I've a problem to get the http method.

I would like to know how do I test if the page send to my website is "post", "get" or "head", and I would like to stop the process if the page is "head".

Can you help me?

Thanks by advance. 

calling WCF service Method in HTTP GET by browser or ASP.NET ( like HttpWebRequest for example)

Can i call a WCF service Method using HTTP GET by browser or ASP.NET (without WCF Client)? it can be done with asmx web service.... but i can't find a way to call a WCF service Method with HTTP GET through the browser or C# ASP.NET Code... can i do that ?

Receiving a message that was sent using HTTP POST

Hello helpers,   I'm somewhere between a beginner and intermediate asp.net and c# user who is looking to receive a message/variable and then URL decode it. The message is being sent via HTTP post. I'm not sure exactly how to get started, and am looking for a tutorial but haven't been able to find one. Can anyone point me in the right direction or give me some sample code to learn from? Thank you for your time  

WCF Basic Http Binding - Two server requests per method call

We have a service that uses BasicHttpBinding/Transport Security/Windows Authentication and is hosted in IIS. I have created a unit-test application in VSTS and whenever we test a WCF method, Fiddler records two calls. 1st call - No authorization token is sent. The WCF service returns a 401 error - Unauthorized: Access is denied. Http headers as sent in the request given below. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Host: localhost Content-Length: 243 Expect: 100-continue Connection: Keep-Alive 2nd call - Authorization token is sent and the WCF service returns the expected response. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Authorization: Negotiate Host: localhost Content-Length: 243 Expect: 100-continue I am not able to figure out why there are two calls made to the server in the first place and what is the significance of the first call. Any thoughts?

HTTP POST in WPF/XBAP with partial trust

Hi, Is it possible to do a HTTP POST in XAML browser app with partial trust? I've tried to search for a solution, but I can't find any. I want to send a HTTP POST request to a website, within the same domain, that return a downloadable report (in a new window, _blank). I've earlier used hyperlink with GET parameters, but I have to use POST due to large amount parameter data. Is this possible? Edit: I'm using .Net Framework 3.5

Programatically Send and receive data using Post Method

Hi,I wish to make a script which programatically send the POST data to one server and then the other server receive the POST message and retrieve the information. How should make this work? I already successfully write the sender site, the code as follow:string postData = "id=0&co=5";ASCIIEncoding encode = new ASCIIEncoding();         //data encoding         byte[] dataEncode = encode.GetBytes(postData);         //end ascii encoding scheme         string url = "http://localhost:51711/Handler1.ashx"; //         //web request         HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);         req.Method = "POST";         req.ContentType = "application/x-www-form-urlencoded";         req.ContentLength = dataEncode.Length;         //send data                Stream st = req.GetRequestStream();         st.Write(dataEncode, 0, dataEncode.Length);         st.Close();ASCIIEncoding encode = new ASCIIEncoding();byte[] dataEncode = encode.GetBytes(postData);stri

HTTP Post to Web Service?

I have a web service that I'm trying to consume from a console app through http post.  I receive a 500 exception error from the xmlstring parm being passed to the web service.  Can someone please help?   Add the following to web.config of the web service.  Although it is not working in debug in vs 2008 as well. <webServices> <protocols> <add name="HttpGet"/> <add name="HttpPost"/> <add name="HttpSoap"/> <add name="Documentation"/> <add name="HttpPostLocalhost"/> </protocols> </webServices> The web service is not executing any logic:Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Security.Cryptography Imports System.IO Imports System.Text Imports System.Xml Imports System.Linq Imports System.Xml.Linq Imports System.Xml.XPath.Extensions Imports System.Data Imports System.Collections Imports System.Collections.Generic Imports System.Diagnostics Imports System.Net Imports System.Diagnostics.Process Imports System.Runtime.InteropServices ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' <System.Web.Script.Services.ScriptServi

WCF HTTP POST - The remote server returned an error: (400) Bad Request. - URGENT

client & sever code below-------------------------------------------- [ServiceContract(Namespace = "http://test.mydomain.com")] public interface IMyService{[WebInvoke(UriTemplate = "", BodyStyle = WebMessageBodyStyle.Bare, Method = "POST")] Stream SaveXML(Stream input); } ----------------------[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(Namespace = "http://test.mydomain.com")] public class MyService : IMyService{  public Stream SaveXML(Stream input)   {              StreamReader streamReader = new StreamReader(input);       string rawString = streamReader.ReadToEnd();       streamReader.Dispose();        // here need to save the input stream to xml format file          //       Encoding encoding = Encoding.GetEncoding("ISO-8859-1");       WebOperationContext.Current.OutgoingResponse.ContentType = "text/xml";         byte[] returnBytes = encoding.GetBytes(rawString);       return new MemoryStream(returnBytes);   } } --------------------------------------------------Client Code         string postData = GetXmlString("d:\\text.xml"); // user function        WebRequest request = WebRequest.Create("http://test.mydomain.com/myservice.svc");        request.Method = "POST";        byte[] byteArray = Encoding.UTF8.GetBytes(p

Http proxy for SSL using relay method on chunked transfer




I'm working on a proxy application; everything works find but ssl connections. here is what i'm doing and the problem description:

The proxy detects Connect request from browser and starts to relay ssl traffic to an external server and then receives the answer then sends the response directly to browser:

The request: Browser Ssl request <--> proxy application <--> external proxy server <--> remote website

I could implement ssl data relay (without touching any byte of it), but it only works for images and a few html pages.

I've checked the transferred data with Wireshark and Fiddler, they reports that all the traffic is sent ok and the data size was ok. But browser only displays direct request to images. (e.g: https://a.fsdn.com/sf/images/develop/logo.png)


Here is my guess about the issue:

I'm buffering all response/request traffic, when buffering is done the app sends it to proxy server/browser. After one full day investigation i realized that the browser only receives the very first part of request for html pages. In my opinion it receives only first chunk of response (but the response in not sent in chunks!) this is what i guess though!

I'm using TcpListener for both Proxy App and Proxy Server.

Please help me through this; what should I do ? :(


pass a dynamic parameter in a WCF method on HTTP GET


i have a WCF method with 2 known parameters and another one thats supposed to include a Key:Value pairs (dynamic parameter that will include an unknown number of key:value pairs).

the first question is :

i don't want to use XML as the dynamic parameter. what is the common way to pass the dynamic parameter in a WCF method? Dictionary<string,String>? json string? array of complex types? or other? ( my client - the one that uses my service, doesn't have Framework 3.5, so i suggested a framework 2.0 ways to send the parameter)

the second question :

the method  supports HTTP GET , should a dynamic parameter be passed in the URL itself or in the Header? i prefer the URL itself....


thank guys, please help ....

Method 'Post' of object 'IOWSPostData' failed


I have Microsoft Office 2003 and Microsoft Sharepoint Designer 2007 on the
same machine. I have a problem uploading an excel spreadsheet into WSS 3.0.
I get Method 'Post' of object 'IOWSPostData' failed error. I have followed
this article (http://mindsharpblogs.com/Kathy/archive/2008/03/16/4450.aspx)
but it doesn't resolve the issue.
Pls, advise how can I resolve this.

Thank you in advance!


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend