473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WebInvoke Method=POST Generic Server Error

When I call an operation from my contract that has been decorated with
webinvoke and a payload is sent, the server always returns a generic error
(400). If I make the same POST request with no payload, the call goes through
with a value of null for the parameter.

Here's some reference code:

[OperationContract]
[WebInvoke()]
string Test1(string testparam);

public string Test1(string testparam)
{
return string.Format("Callin Test1...{0}", testparam);
}

On Fiddler this is the request I make:

POST /RESTCatalogService.svc/Test1 HTTP/1.1
User-Agent: Fiddler
content-length: 28
content-type: application/xml
host: localhost:44929

<testparam>abcde</testparam>

This request fails with a 400 error: "The server encountered an error
processing the request", if I don't send the testparam payload, the method
gets executed with no problems.

Any insights on this would be really appreciated.
Oct 14 '08 #1
0 2441

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob | last post by:
THis is my code. What im trying to accomplish is the user fills out the form then when they hit submit it displays what the entered on the samne page but i get this error message when I hit submit...
3
by: Armin Irger | last post by:
Hi, i'am running a debian sarge with the delivered apache2 mysql and php4. The file "mitarbeiter_eingabe.php" gets the data over a html <FORM> and send it to...
5
by: phil | last post by:
This is a quick plea on something that has me stumped. I have a python script importing "cgi" I developed my script on a local machine using method = get for uploading form data. My code...
2
by: Heinrich Klein | last post by:
Hello I have got an the Unload Handler is it possible when the Browser is closed to send a Method post to a CGI program? If yes how can i do this normally i need to push a Button. Thanks for...
4
by: Don | last post by:
How do I retrieve URL parameters via html, where they were provided from a <form method=post...>? Thanks in advance, Don -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----...
4
by: Paul J. Lay | last post by:
I am sending and receiving multipart messages using the WebClient UploadData method Method=Post. Everything seems to work well except when the URL contains parameters. For example:...
12
by: Britney | last post by:
Hi guys, in my default.aspx file, I have following code. when I go to browser, I enter values in both textboxs, then I hit submit Button, however, it didn't go to page2.aspx. instead, it was...
8
by: burut | last post by:
Hi, I have index.php page (attached). The flow is when I put username/password on the page, it will submit to be processed by connection.php where in connection.php, it require koneksi_db.php to...
11
by: =?Utf-8?B?QkxVRVNUQVI=?= | last post by:
Here is the link of the website http://www.smartcharlotte2050.com/YourThoughts.asp I have been told to change only the form action part of this site.which is to "response.asp" Here the method...
4
by: codyshea2000 | last post by:
this is my html /php form but every time i click submit it says the metod post is not alowed how can i fix this <!-- Form made by cody.m --> <center> <FORM METHOD="POST" ACTION="test.php"> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.