EXT解决“HTTP/1.1 405 Method not allowed”问题
2012-12-28 16:50
966 查看
Apache、IIS、Nginx等大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。 即将出错页面表单的method=“post”改为“get”即可。
Ext Tree组件做一个东西,需要用到ajax对节点逐级加载,开始数据用的静态数据data.xml,访问提示“405错误”,原因是资源禁止访问.在.NET里参数传递方式不对,IIS用GET接受数据,但请求用POST传递数据,因此就会出现这个问题.
解决方案:在TreeLoader里加一个requestMethod:'GET'就ok了。
Loader的代码大致是这样的:
// Our custom TreeLoader:
loader: new Ext.app.BookLoader({
dataUrl:'xml-tree-data.xml',
requestMethod: 'GET'
}),
相关文章推荐
- 解决“HTTP/1.1 405 Method not allowed”问题,让静态文件响应POST请求
- 解决“HTTP/1.1 405 Method not allowed”问题,让静态文件响应POST请求
- 解决“HTTP/1.1 405 Method not allowed”问题,让静态文件响应POST请求
- 解决“HTTP/1.1 405 Method not allowed”问题
- 解决“HTTP/1.1 405 Method not allowed”问题,让静态文件响应POST请求[原创]
- 解决“HTTP/1.1 405 Method not allowed”问题
- 解决“HTTP/1.1 405 Method not allowed”问题
- 解决“HTTP/1.1 405 Method not allowed”问题,让静态文件响应POST请求
- nginx中HTTP/1.1 405 Method not allowed 的解决方法
- 解决IIS7 HTTP/405 Method Not Allowed 问题的方法.
- 解决IIS7 HTTP/405 Method Not Allowed 问题的方法.
- 解决IIS7 HTTP/405 Method Not Allowed 问题的方法.
- Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。
- 问题_http 1.1 405 http method get is not supported by this url
- jQuery ajax 请求HttpServlet返回[HTTP/1.1 405 Method not allowed]
- jQuery ajax 请求HttpServlet返回[HTTP/1.1 405 Method not allowed]
- Nginx HTTP Post Method: 405 Method not allowed 解决办法
- 关于Servlet报错:405 HTTP method GET is not supported by this URL问题解决方法
- IDEA Servlet : HTTP Status 405 – Method Not Allowed
- IIS7 HTTP/405 Method not allowed , 服务启用 PUT谓词