0411-39943997
工作时间:周一至周日 8:30-17:30
技术文库
Technical Library

.net core cors 跨域 get post 可以 put delete 不行

标签: .net core cors 跨域 get post 可以 put delete 不行   访问: 11312022-01-19

.net core cors 跨域 get post 可以 put delete 不行

在webconfig中添加:


 <?xml version="1.0" encoding="utf-8"?>

<configuration>

   <system.webServer>

     <modules runAllManagedModulesForAllRequests="true" runManagedModulesForWebDavRequests="true">

        <remove name="WebDAVModule" />

     </modules>

     <handlers>

       <remove name="WebDAV" />

       <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

     </handlers>

     <aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\TexHong_EMWX.Web.Host.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">

       <environmentVariables />

     </aspNetCore>

     <httpProtocol>

       <customHeaders>

         <remove name="X-Powered-By" />

       </customHeaders>

    </httpProtocol>

   </system.webServer>

 </configuration>


Asp.NETCore 部署IIS配置了允许跨域但还是不支持 PUT , POST请求

原文地址:https://www.cnblogs.com/liaoyd/p/13636995.html

Copyright© 2020 仟亿科技,All rights reserved.