Your WordPress permalinks are probably formatted like this:
http://www.mysite.com/?page_id=38
Because your IIS is complaining, it needs to be formatted like this:
http://www.mysite.com/index.php?page_id=38
Explanation:
You can fix it by changing the permalink to always show a index.php in
the URL. Like this: http://www.mysite.com/index.php?page_id=6
IIS is causing this problem. Linux servers never have this problem.
IIS does not like that there is no document file type in the URL (no
.php, .htm, or .html).
The links need to end in .php or .htm or .html
because IIS servers will not display a page usig an unknown document
type when the page is using GET or POST method.
One site with instructions
http://www.richardshepherd.com/wordpress-iis-permalinks-and-index-php/
Why does this only happen on the contact form and not on the WordPress
functions?
All the comment forms and other wordpress functions post to wordpress
PHP files directly. The comment form uses the page URL and that is where
permalinks can become an issue.
Fix:
IIS needs to see the .php in there somewhere so it knows how to handle
the request.
Try this setting in WordPress:
Admin – Settings – Permalinks
Custom Structure: /index.php
Let me know if the contact form works now
A possibly better fix? switch to Linux hosting: