Achraf Ben Alaya
No Result
View All Result
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
    • General Tips & Fix
  • AI
  • Cloud
  • Motivation
  • Courses
  • About
    • Resume
    • Privacy Policy
SUBSCRIBE
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
    • General Tips & Fix
  • AI
  • Cloud
  • Motivation
  • Courses
  • About
    • Resume
    • Privacy Policy
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
6.6k
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

AI

Model Context Protocol (MCP): The Future of AI Integration

April 21, 2025
90
Azure

Step-by-Step Guide: Azure Front Door + Storage Account Static Website + Custom Domain with Terraform

March 11, 2025
211
Network Security & Route Tables – Checking NSGs, route tables, and service endpoints for a targeted VNET or Subnet
Azure

Network Security & Route Tables – Checking NSGs, route tables, and service endpoints for a targeted VNET or Subnet

February 3, 2025
132
Understanding Generative AI and RAG Benefits
AI

Understanding Generative AI and RAG Benefits

January 12, 2025
95
Azure Communication Services Email Sending Simplified: From Setup to Execution and Monitoring
Azure

Azure Communication Services Email Sending Simplified: From Setup to Execution and Monitoring

December 8, 2024
1.5k
PowerShell Automation for Azure Networks: Detailed VNET and Subnet Analysis
Azure

PowerShell Automation for Azure Networks: Detailed VNET and Subnet Analysis

November 2, 2024
495
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

Model Context Protocol (MCP): The Future of AI Integration

April 21, 2025
90
How to make the most of each day

How to make the most of each day

February 2, 2021
315
Understanding Generative AI and RAG Benefits

Understanding Generative AI and RAG Benefits

January 12, 2025
95
Blazor Write C# instead of JavaScript to Build a Client-Side Single-Page App

Blazor Write C# instead of JavaScript to Build a Client-Side Single-Page App

April 19, 2020
688
My 2020 Review

My 2020 Review

December 31, 2020
238
Revolutionizing IP Management in Azure with IPAM: Explore, Deploy, and Master!

Revolutionizing IP Management in Azure with IPAM: Explore, Deploy, and Master!

October 4, 2023
399
Facebook Twitter LinkedIn Youtube

Model Context Protocol (MCP): The Future of AI Integration

April 21, 2025

Step-by-Step Guide: Azure Front Door + Storage Account Static Website + Custom Domain with Terraform

March 11, 2025
Network Security & Route Tables – Checking NSGs, route tables, and service endpoints for a targeted VNET or Subnet

Network Security & Route Tables – Checking NSGs, route tables, and service endpoints for a targeted VNET or Subnet

February 3, 2025

Categories

  • AI (2)
  • Apps (1)
  • Azure (63)
  • blazor (2)
  • Blog (91)
  • c# (7)
  • Cloud (65)
  • Courses (3)
  • Dapr (4)
  • docker (4)
  • Games (1)
  • General Tips & Fix (1)
  • Home (1)
  • Kubernetes Service (AKS) (1)
  • motivation (2)
  • Motivation (3)
  • News (9)
  • Resume (1)
  • sql (4)
  • Terrafrom (1)
  • Tricks, Tips and Fixes (4)
  • xamarin (5)
No Result
View All Result
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
    • General Tips & Fix
  • AI
  • Cloud
  • Motivation
  • Courses
  • About
    • Resume
    • Privacy Policy

ADVERTISEMENT