簡體   English   中英

Laravel Azure 不允許應用服務刪除方法

[英]Laravel Azure App Service Delete Method Not Allowed

在 Azure 的應用服務中托管 laravel 應用,並且每次 web 應用發出 DELETE 請求時,它都會拋出 405 Method Not Allowed 並返回以下消息:

The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

我已經用盡了我在互聯網上可以找到的所有選項,並嘗試了所有提到的東西。 希望有人能幫忙。

如果您的應用程序使用 .NET WebAPI,當您發出 PUT 或 DELETE 請求時,您可能會收到 405 Method Not Allowed 錯誤。 這個錯誤是因為WebDAV模塊攔截了請求引起的

在您的 web.config 中,嘗試插入此代碼

<system.webServer>    
  <modules>        
    <remove name="WebDAVModule" />    
  </modules>    
  <handlers>        
    <remove name="WebDAV" />    
  </handlers>
</system.webServer>

這個問題與這個問題重復

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM