Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm totally new to IIS7. I get a 400 error when doing any POST request. However GET requests work fine. I'm using PHP for processing but i assume that IIS is missing some configuration to allow POST

share|improve this question

migrated from stackoverflow.com Aug 28 '12 at 13:13

This question came from our site for professional and enthusiast programmers.

1  
You are sending a malformed POST request to IIS7: support.microsoft.com/kb/943891#tocHeadRef –  Sayem Ahmed Aug 26 '12 at 4:54
    
im basically sending "POST site.com/test.php?q=1&id=2&name=jim";. How would that be malformed? GET works ok. –  glutz Aug 26 '12 at 4:57
    
oh. do i have to POST in the header or something? –  glutz Aug 26 '12 at 4:57
    
Check your request headers. Probably you are doing something wrong there. –  Sayem Ahmed Aug 26 '12 at 5:07
2  
When sending POST requests, data are passed as part of the request ( in the message body), not in the URL. –  Sayem Ahmed Aug 26 '12 at 5:11
show 1 more comment

1 Answer

By default IIS and PHP accept POST requests correctly, I'm assuming that your "POST" request is malformed in some way, meaning it isn't really running as an actual POST request. Check out this KB Article on IIS 400 error.

Can you write the code here or your request you are running, so we can see more and may be better able to help.

share|improve this answer
    
It's not very clear but the op actually found their solution, they mentioned in their comments. I'm going to leave your answer here because yours is much more obvious. –  Mark Henderson Oct 26 '12 at 19:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.