"Problem log" C # calls Webapi's Put&delete method to report a 405 error

Source: Internet
Author: User

problem Environment : Windows Server 2008R2 IIS7.5

Problem Description : Site Call backend Data interface, get and post method normal, put and delete method report

     405 Method not allowed, No ' Access-control-allow-origin ' header is present on the requested resource.

Of course, the cross-domain processing has been done, local is no problem.

Workaround :

Stick to Google's most adopted solution:

    • under   of the Web. config configuration file, <system.webserver>  node, add the following configuration:  
      <modules runallmanagedmodulesforallrequests= "true" > <remove name= "webdavmodule"/> </modules> 
    • in <HANDLERS>
      < /pre>
       <remove name= "WebDAV"/> 

But I tried it all, and there was no effect, and then in the Control Panel program and features, turn Windows features on or off to remove WebDAV, restart IIS, and work properly.

"Problem log" C # calls Webapi's Put&delete method to report a 405 error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.