简体   繁体   中英

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.

Failed to load resource: net::ERR_CONNECTION_RESET

(I can not upload picture.)

  • Common HTTP Features (4 of 6 installed)
    • Default Document
    • Directory Browsing
    • HTTP Errors
    • Static Content
  • Health and Diagnostics
    • HTTP Logging
  • Performance
    • Static Content Compression
  • Application Development
    • CGI
    • ISAPI Extensions
    • ISAPI Filters
    • WebSocket Protocol
  • Management Tools
    • IIS Management Console

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. 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

Or you can refer to this link: Failed to load resource:.net::ERR_CONNECTION_RESET

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM