Achraf Ben Alaya
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
SUBSCRIBE
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume
No Result
View All Result
Achraf Ben Alaya
No Result
View All Result
ADVERTISEMENT
Home Blog

405 method not allowed in IIS

IIS 10.0 Detailed Error - 405.0 - Method Not Allowed

achraf by achraf
October 17, 2020
in Blog, Tricks, Tips and Fixes
3 min read
0
405 method not allowed in IIS
0
SHARES
3.2k
VIEWS
Share on FacebookShare on Twitter

Recently , I was delivering a project for a client , and usually what I do is , I prepare CI/CD pipelines , I test the project and I deliver it .

That worked fine , but this time , the client wants the project to be hosted on his own virtual machine , no problem with that let me do it ,it will take 15 min and  later I can go  jogging or maybe watch an episode of Gotham and see what will happen to Bruce! .

I published the project to a folder , launched IIS ,added a new site and hosted it ,good , let  me test !

I tested the create and get methods ,they worked , and the lesson that I learned in my earlier job is that I need to test everything ,not just 1 or 2 methods but everything !

And boom ! the delete and put methods don’t work ! what’s going on !

I mean they work in Visual studio ?! they work in app service  on azure !

What’s going on and what the heck is this !

” IIS 10.0 Detailed Error – 405.0 – Method Not Allowed ”

it’s Friday 5 PM and this happens .. “the difference between the past and the present  that , I used to freak out but now I smile and say : Oh yeah , something new to learn and share !”

So , I said to my self : right now I have 3 goals :

1- Fix this no matter what, so it’s works and the client can start testing

2- know why this happened and fix it if it needs to be fixed again.

3-share this .

 

So ,I started the search and if you are looking to quick fix all you have to do now is to insert those lines to web.config under system.webServer

<modules runAllManagedModulesForAllRequests="false"> 
        <remove name="WebDAVModule" /> 
        </modules>

PS : You may need to recycle the app pool or restart IIS for this change to take effect.

Now it’s time to understand why this happened ,the first tought that came to my mind is WebDav can cause IIS to block the Delete and the Put calls ,and if there is no WebDav there is no problem and no block .

What is WebDAV?

WebDAV is short for Web Distributed Authoring and Versioning, and it is an open-standard extension to the HTTP protocol that enables file management over the Internet. In addition to the usual file system-like operations (copy, move, delete, etc), WebDAV adds a flexible property mechanism (based on name/value pairs) and resource locking. WebDAV is a critical component in Microsoft’s web publishing story, used by the WebDAV redirector, Web Folders, SMS/SCCM, and many other components.

Anonymous PROPFINDs are allowed for file listings, but file uploads and WebDAV-based GET requests require an authenticated user. This is a change from IIS 6.0, where anonymous WebDAV file uploads/downloads could be enabled by opening up your security. In WebDAV for IIS 7.0 and above we changed this behavior so that all WebDAV activity would require authentication, but we allow for the use of anonymous PROPFINDs for backward-compatibility with some WebDAV clients. (More specifically, the PUT, MKCOL, PROPPATCH, COPY, MOVE, DELETE, and WebDAV-based GET requests all require authentication.)

If you need more informations you can read from :  link

The Fix  

After understanding what is WebDav now it’s time to see the fix and how can be done .

1-Deleting WebDAV :

If there is no need for you to use WebDav in general , you can remove it from the system , if you are using windows 10 you can go to “Turn Windows Features On or Off” and uncheck it

 

In Windows Server you need to go to removing features in server manager .

2- A Quick Fix :

The fix can be done by adding to the web.config:

<modules runAllManagedModulesForAllRequests="false"> 
        <remove name="WebDAVModule" /> 
        </modules>

 

hope this was helpful 🙂

ShareTweet
Previous Post

How to Claim My Free Microsoft Certification Voucher

Next Post

Where is my Money ! The Proper way To Shutdown Azure VM

Related Posts

Switch to Azure Container Registry from Docker Hub
Azure

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
132
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
229
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)
Azure

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022
102
How to setup nginx reverse proxy for aspnet core apps with and without  Docker compose
Azure

How to setup nginx reverse proxy for aspnet core apps with and without Docker compose

November 23, 2022
153
Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁
Blog

Win free certifications at the Microsoft Build Cloud Skills Challenge | May 2022 🎁

May 28, 2022
107
Generating report for SSL Certificates for Websites with PowerShell
Azure

Generating report for SSL Certificates for Websites with PowerShell

April 10, 2022
386
Next Post
Where is my Money ! The Proper way To Shutdown Azure VM

Where is my Money ! The Proper way To Shutdown Azure VM

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Terraform

Certifications

Microsoft certified trainer (MCT)

Recommended

Finally Azure Static Web Apps no more in Preview!

Finally Azure Static Web Apps no more in Preview!

May 15, 2021
556
Installing WordPress with docker image of XAMPP

Installing WordPress with docker image of XAMPP

April 21, 2020
665
Auto Post and Schedule Tweets & Linkedin using Azure Logic Apps

Auto Post and Schedule Tweets & Linkedin using Azure Logic Apps

April 14, 2021
367
Configure Azure Web App Logging With .NET 5

Configure Azure Web App Logging With .NET 5

December 11, 2020
1.7k
My 2020 Review

My 2020 Review

December 31, 2020
168
Azure Function to Upload Data to Azure Blob

Azure Function to Upload Data to Azure Blob

August 29, 2020
2.5k
Facebook Twitter LinkedIn Youtube
Switch to Azure Container Registry from Docker Hub

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to configure an ingress controller using TLS/SSL for the Azure Kubernetes Service (AKS)

November 25, 2022
How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

How to setup nginx reverse proxy && load balancer for aspnet core apps with Docker and azure kubernetes service (AKS)

November 23, 2022

Categories

  • Apps (1)
  • Azure (39)
  • blazor (2)
  • Blog (62)
  • c# (7)
  • Cloud (37)
  • Dapr (4)
  • docker (3)
  • Games (1)
  • General Tips & Fix (1)
  • Motivation (3)
  • motivation (2)
  • News (9)
  • Resume (1)
  • sql (4)
  • Tricks, Tips and Fixes (3)
  • xamarin (5)
No Result
View All Result
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • Exam Preparation
    • AZ-104
    • AZ-400
  • About
    • Resume