1

I have a restfull web service in .Net. When we tested the PUT in a PC with windows 7 and IIS 7 it works fine.

When we tested the web service in a PC with windows 8 and IIS 8.5 we get a 405 status code. This is the result from Fiddler

enter image description here

Edit This is the applicationHost.config part regarding ExtensionlessUrlHandler-Integrated. I don't have an ExtensionlessUrl-Integrated

enter image description here

I assume this is a IIS issue, anyone knows how to solve this? Thanks in advance

Ignacio Gómez
  • 1,587
  • 4
  • 23
  • 41

2 Answers2

4

You have to add the PUT verb in your ExtensionlessUrl-Integrated-4.0 list. Make the following change your applicationhost.config file for your IIS instance.

<add name="ExtensionlessUrl-Integrated-4.0" path="*." verb="GET,HEAD,POST,PUT,OPTIONS,TRACE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />

You will also want to add any other verbs you might be allowing like DELETE.

See: ASP.NET Web API - PUT & DELETE Verbs Not Allowed - IIS 8

Community
  • 1
  • 1
Xipooo
  • 1,496
  • 1
  • 14
  • 13
2

It mainly happens due to WebDAV installation to IIS Server.

Just add the following XML block in your web.config file

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