IIS on Windows 7: 400 bad request when requesting XML files

房东的猫 提交于 2019-12-08 18:40:33

I found the issue.

When requesting the XML files I was adding the If-Modified-Since header which is in the HTTP spec but IIS on Windows 7 seems to return 400 Bad Request when this is added. Simply removing this header from the request fixes the issue.

Is your xml file static or dynamically generated?

If static then check the following:

Your (successful) browser request would be using a GET request. Is your webpage request using POST? If so, POST may not be an accepted verb for a static xml file.

Check the IIS configuration settings for .xml suffix files.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!