.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

Receiving a message that was sent using HTTP POST

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
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  

View Complete Post

More Related Resource Links

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?

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) {


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

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!

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

MS Message Queueing (MSMQ) 4.0 - Slow HTTP delivery

I've sent 1000 messages with a simple 20 character string as the body using DIRECT:FORMAT=HTTP://mydomain.com/msmq/private$/myqueue   The outbound queue currently sends batches of about 20-30 messages then pauses for 5 minutes before sending another 20-30.   The outbound message queue is on ADSL and the receiving queue is on a 100Mb internet connection in co-location.   Has anyone else encountered such slow send speeds? Any clues or hints on how to speed this up?

MS Message Queueing 4.0 HTTP Support - 500 Internal Server Error

Hi all,   I've been trying to set up MSMQ 4.0 with HTTP Support to allow one of our partners to send messages to us. However, whenever I make any call to the msmq page I get an internal server error 500 (See below). My platform is Windows 2008 SE (64-bit) running as a DC (though MSMQ is running in workgroup mode).   Any hints on what might be causing this or how I can investigate further? Are there any log files for the ISAPI extension, or the MQISE.dll, or the MSMQ service that might help me shed light on this problem?   I've seen blogs about an issue with MSMQ 3.0 where the machine name can't be 15 characters long, is this still the case with MSMQ 4.0?   The error details are as below,     Server Error in Application "WWW.MYDOMAIN.COM/MSMQ" Internet Information Services 7.0 HTTP Error 500.0 - Internal Server Error There is a problem with the resource you are looking for, so it cannot be displayed. Detailed Error Information  Module IsapiModule Notification ExecuteRequestHandler Handler AboMapperCustom-113521 Error Code 0x8007007e Requested URL http://www.mydomain.com:80/msmq Physical Path c:\inetpub\www.mydomain.com\msmq Logon Method Anonymous Logon User Anonymous The path to the ISAPI Filter is incorrect. IIS received the request; however, an internal error occurred during the processing

An error occurred while receiving the HTTP response to xxx problem. WCF comunication

I have been having this problem transmiting data (XML from a microsoft sincronization session v1.0) to a WCF service on IIS 6.I have enabled tracing on my WCF service, verbose, but nothing shows up. No exceptions what so ever.My client connects over a GPRS line. But i have also done this over ADSL with the same results.The thing is, it starts transmiting ( i can see it on wireshark) but suddenly the server side sends a TCP RST packet and the transmission ends with a client exception like An error occurred while receiving the HTTP response to http://blabalblabla/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.It never actually gets to my code (otherwise i would probably see something on my trace)Thank you!My binding are this (on client):<basicHttpBinding><binding name="BasicHttpBinding_Issap_mainSyncContract" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="

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

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.



Receiving error message: Incorrect syntax near 'au'.

"SELECT am.State,au.Email,am.Phone,au.UserId,au.Name FROM table1 au INNER JOIN table2 am on au.UserId = am.UserId" 

"UPDATE table1 au INNER JOIN table2 am on au.UserId = am.UserId SET am.State = @State,au.Email = @Email,am.Phone = @Phone,au.UserId = @UserId,au.Name = @Name"


Might someone be able to tell me what may be causing the above error message in one or both of the above statements?

Many thanks


There was no endpoint listening at that could accept the message. T


Hi Experts,

I getting the error which specified in the title.

My Application Details:

I developed a VSTO Word 2007 add-in application which consumes WCF web service and render report in word document.

I deployed my VSTO Word 2007 add-in application using Click Once  technology.

WCF Service is hosted in IIS7 my IIS7 server is configured in a load balancer environment.

This application was released to production and running successfully for all clients as of.

But one of my new client is facing problem and getting the following error "There was no endpoint listening at <http://app.domain.com/api.svc.> that could accept the message. This is often caused by an incorrect address or SOAP action. "

This issue is not coming for any other clients except this new client.


This is a urgent requirement and need to fix ASAP, experts please help me 


Thanks in advance,


Receiving an IPv6 Multicast Message



Im working with IPv6 on C#, developing a Router Advertisement Daemon. Im having problems to receive the Router Solicitation Messages.

The Router Solicitation Messages are sended to the All-Routers Multicast Address FF02::2. This is what i've tried so far:

Socket socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Raw, ProtocolType.IcmpV6);    
IPv6MulticastOption multicastOption = new IPv6MulticastOption(IPAddress.Parse("FF02::2"));  

How to get remote site url from HTTP POST


I have a remote website form which sends variables to a page of my asp website. This is a standard form with http post.  How do I access the url which sent the request to the page? Is this an environment variable? Http_referrer?


BasicHttp binding service failing when receiving a message with a To soap header


My WCF service is exposed through a basicHttp binding.


When I receive the following message

 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://biztalk01:81/StuffServices.svc</To> </s:Header> <s:Body> <ns0:GetMyStuff xmlns:ns0="http://example.com/stuff" xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <ns0:inputArray> <ns1:string>80220</ns1:string> </ns0:inputArray> </ns0:GetMyStuff > </s:Body> </s:Envelope>

it gives a fault back, but if I try in soapUI to send the exact same request without the To header (deleting the "<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" >http://biztalk01:81/StuffServices.svc "), then it works fine and returns the correct response.

Do I have any way to make my service handle that request including a To header correctly?

I tried changing my binding to a CustomBinding as described here : http://blog.irm.se/blogs/eric/archive/2008/07/04/WS_2D00_Addressing-and-WCF.aspx

but that only resulted in the IIS worker proc

Sending and receiving message using windows mobile 6.


Hello folks,

I am trying to find out a way to send and receive message in my web application.

I am using HTC windows mobile 6 professional / Nokia 3110c 

i have also tried MAPI but i am not able to connect it with ASP.NET(C#)


Mihir Soni

HTTP POST request and encoded string



I have to do a simple HTTP POST request by key/value pairs and receive a XML file with a session key. I made it work, but there's something strange about it - when session key includes character '&', then it return encoded like '&amp;'. After that my application needs to send that session key to server every time I make a query. When session key includes '&', then query won't work, because server side is expecting correct (not encoded) session key. Does somebody knows how to fix this problem? My HTTP POST Content-type is "application/x-www-form-urlencoded".

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