简体   繁体   English

Windows 服务器 2019 和 IIS 10 GET、POST 工作正常但不能从外部使用 PUT、DELETE

[英]Windows server 2019 and IIS 10 GET,POST work fine but can't use PUT,DELETE from external

I try to install react(axios) in IIS and use node.js as server GET,POST work fine but PUT,DELETE (can use in internal) did not I tested in Linux server node.js work fine, I try to solve for week such as ExtensionlessUrlHandler,cors, etc. now I disable Request filter in IIS still did not work.我尝试在 IIS 中安装 react(axios) 并使用 node.js 作为服务器 GET、POST 工作正常但是 PUT、DELETE(可以在内部使用)没有我在 Linux 服务器 node.js 中测试工作正常,我尝试解决一周,例如 ExtensionlessUrlHandler ,cors 等现在我在 IIS 中禁用请求过滤器仍然没有用。

Failed to load resource: net::ERR_CONNECTION_RESET

(I can not upload picture.) (我无法上传图片。)

  • Common HTTP Features (4 of 6 installed)常见 HTTP 功能(已安装 4 个,共 6 个)
    • Default Document默认文件
    • Directory Browsing目录浏览
    • HTTP Errors HTTP 错误
    • Static Content Static 内容
  • Health and Diagnostics健康与诊断
    • HTTP Logging HTTP 记录
  • Performance表现
    • Static Content Compression Static 内容压缩
  • Application Development应用开发
    • CGI电脑影像
    • ISAPI Extensions ISAPI 扩展
    • ISAPI Filters ISAPI 过滤器
    • WebSocket Protocol WebSocket 协议
  • Management Tools管理工具
    • IIS Management Console IIS 管理控制台

web.config web.config

    <?xml version="1.0"?>
<configuration>
 <system.webServer>
 <rewrite>
 <rules>
 <rule name="React Routes" stopProcessing="true">
 <match url=".*" />
 <conditions logicalGrouping="MatchAll">
 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
 <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
 </conditions>
 <action type="Rewrite" url="/" />
 </rule>
 </rules>
 </rewrite>
 </system.webServer>
</configuration>

This error may be caused by cookies and most often seen with chrome users.此错误可能是由 cookies 引起的,并且最常见于 chrome 用户。 You can try the following steps to solve your problem.您可以尝试以下步骤来解决您的问题。

Go to Chrome settings > Privacy and security > Cookies and other site data > Cookie > All cookie and Site Data > Delete domain problem Go 到 Chrome 设置 > 隐私和安全 > Cookies 和其他站点数据 > Cookie > 所有 cookie 和站点数据 > 删除域问题

Or you can refer to this link: Failed to load resource:.net::ERR_CONNECTION_RESET或者你可以参考这个链接: Failed to load resource:.net::ERR_CONNECTION_RESET

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Windows Server 2019 在 IIS 10 上托管 Node JS 应用程序 - How to host Node JS app on IIS 10 with Windows Server 2019 为什么来自 Node/Express 的 POST 和 PUT 请求在 React/Redux 中不起作用? 我的 GET 和 DELETE 请求一切正常。 所有请求都在 Postman 中工作 - Why are my POST and PUT requests from Node/Express not working in React/Redux? My GET and DELETE requests all work fine. All requests work in Postman Electronjs + Reactjs | Window 服务器 2012 R2 在应用程序启动时挂起(白屏),在 windows 10 和 windows 服务器 201 上工作正常 - Electronjs + Reactjs | Window server 2012 R2 hangs on app launch (white screen), works fine on windows 10 and windows server 2019 无法使用 axios 从/向 android 7.0 设备中的本地主机服务器获取/发布数据 - React Native 应用程序 - Can't use axios to get/post data from/to localhost server in android 7.0 device - React Native app 我无法使用IIS和IISNode从Windows Server 2012外部访问我的网站 - I can't access my website from outside Windows Server 2012 using IIS and IISNode 我可以使用 POST 和 GET,但为什么我不能在 MongoDB Atlas 中使用 DELETE - I cam use POST and GET, but why I can't use DELETE in MongoDB Atlas 无法将带有自定义标头的HTTP POST发送到外部服务器 - Can't send HTTP POST with custom headers to external server Express中get/post/put/delete的路径参数 - Path parameter of get/post/put/delete in Express 无法在Fine Uploader中删除文件 - Can't delete file in Fine uploader NodeJS + Express:服务器无法解析 GET、PUT、POST 或 DELETE 请求(状态 404) - NodeJS + Express: Server cannot resolve GET, PUT, POST, or DELETE requests (Status 404)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM