angular - 如何修复 IIS 错误(不允许使用 PUT 方法)
问题描述
我开发了一个用于服务器端渲染的 Angular Universal 应用程序。我必须在服务器中保存一个文件。该文件保存在 Angular 应用程序的文件夹中。当我构建应用程序并将其添加到 IIS 服务器时,我无法上传目录中的文件。我收到错误 PUT Method not allowed.任何帮助都会很棒!
polyfills-es2015.99fc5dde03f2933ff53f.js:1 PUT http://localhost:99/files 405(不允许的方法)
解决方案
This error is caused because the WebDAV module intercepted the request.
you could try to add the below code in your site web.config file:
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
推荐阅读
- bash - 实验返回解析器错误的具体输入
- reactjs - 事件处理程序中的未定义属性
- json - XML 和 JSON 是否用于在客户端和服务器之间*通信*信息?
- angularjs - 为什么过滤不适用于我在剑道网格中的数据
- reactjs - 从数组生成表的算法?
- java - java - 如何在Java SimpleXML中序列化没有节点的封闭标记
- php - 从表单发送隐藏值的问题
- python - 在 MatPlotLib Graphs 之间切换时如何停止 PyQt5 中出现的多个工具栏?
- angularjs - 带有字符串值的 ng-model 复选框
- typescript - 创建一个类型,它是对象属性的数组