[整理]IIS 6.0 下部署 Asp.net MVC Web Api 后 HTTP PUT and DELETE 请求失败
http://guodong.me/?p=1560
ASP.NET MVC 4 has a new feature called WebAPI which makes it much easier to create a REST API in ASP.NET. Unfortunately, I ran into one problem with IIS 6.0 that prevented the full REST spec from being used. By default IIS 6 wouldn’t allow the PUT or DELETE verbs to be used with the WebAPI app that we created.
Page requests using GET and POST worked fine, but PUT and DELETE gave the following error:
Failed to load resource: the server responded with a status of 501 (Not Implemented)
In order to solve the issue I needed to add the ASP.NET 4.0 dll to
the Wildcard mappings in the Configuration area on the Home Directory
tab for the website. That fixed the problem for me. Here are the steps
that I took to correct the issue in IIS.
1. Find the web site in the “Web Sites” folder in Internet Information Services (IIS) and right-click and select properties.
![]()
2. Go to the “Home Directory” tab and click the “Configuration…” button.
![]()
3. Find the .aspx extension in the “Application extensions” table, select it and press the “Edit…” button.
![]()
4. Copy the entire path and file name in the “Executable:” text box to the clipboard. Press the “Cancel” button.
![]()
5. Press the “Insert…” button near the “Wildcard application maps”
list box. Paste the text from the clipboard into the “Executable:” text
box and press “OK”.
![]()
6. Press OK on the Application Configuration dialog and again on the website properties box.
参考:
http://stackoverflow.com/questions/9904897/iisnode-iis7-5-405-method-not-allowed-when-performing-put-request
http://www.cnblogs.com/artech/p/3606873.html
http://www.cnblogs.com/artech/p/web-api-sample.html
http://blog.csdn.net/forgotaboutgirl/article/details/6936982
[整理]IIS 6.0 下部署 Asp.net MVC Web Api 后 HTTP PUT and DELETE 请求失败的更多相关文章
- 主攻ASP.NET MVC4.0之重生:ASP.NET MVC Web API
UserController代码: using GignSoft.Models; using System; using System.Collections.Generic; using Syste ...
- 在Mac下创建ASP.NET Core Web API
在Mac下创建ASP.NET Core Web API 这系列文章是参考了.NET Core文档和源码,可能有人要问,直接看官方的英文文档不就可以了吗,为什么还要写这些文章呢? 原因如下: 官方文档涉 ...
- [译]ABP框架使用AngularJs,ASP.NET MVC,Web API和EntityFramework构建N层架构的SPA应用程序
本文转自:http://www.skcode.cn/archives/281 本文演示ABP框架如何使用AngularJs,ASP.NET MVC,Web API 和EntityFramework构建 ...
- ASP.NET MVC Web API 学习笔记---第一个Web API程序
http://www.cnblogs.com/qingyuan/archive/2012/10/12/2720824.html GetListAll /api/Contact GetListBySex ...
- ABP 教程文档 1-1 手把手引进门之 AngularJs, ASP.NET MVC, Web API 和 EntityFramework(官方教程翻译版 版本3.2.5)含学习资料
本文是ABP官方文档翻译版,翻译基于 3.2.5 版本 转载请注明出处:http://www.cnblogs.com/yabu007/ 谢谢 官方文档分四部分 一. 教程文档 二.ABP 框架 三. ...
- ASP.NET MVC Web API Post FromBody(Web API 如何正确 Post)
问题场景: ASP.NET MVC Web API 定义 Post 方法,HttpClient 使用 JsonConvert.SerializeObject 传参进行调用,比如 Web Api 中定义 ...
- ASP.NET MVC Web API For APP
近来很多大型的平台都公开了Web API.比如百度地图 Web API,做过地图相关的人都熟悉.公开服务这种方式可以使它易于与各种各样的设备和客户端平台集成功能,以及通过在浏览器中使用 JavaScr ...
- 【转载】ASP.NET MVC Web API 学习笔记---联系人增删改查
本章节简单介绍一下使用ASP.NET MVC Web API 做增删改查.目前很多Http服务还是通过REST或者类似RESP的模型来进行数据操作的.下面我们通过创建一个简单的Web API来管理联系 ...
- Asp.net mvc web api 在项目中的实际应用
Asp.net mvc web api 在项目中的实际应用 前言:以下只是记录本人在项目中的应用,而web api在数据传输方面有多种实现方式,具体可根据实际情况而定! 1:数据传输前的加密,以下用到 ...
随机推荐
- Istio 流量治理功能原理与实战
一.负载均衡算法原理与实战 负载均衡算法(load balancing algorithm),定义了几种基本的流量分发方式,在Istio中共有4种标准负载均衡算法. •Round_Robin: 轮询算 ...
- HyperLedger/Fabric JAVA-SDK with 1.1
HyperLedger/Fabric JAVA-SDK with 1.1 该项目可直接在github上访问. 该项目介绍如何使用fabric-sdk-java框架,基于fabric-sdk-java ...
- [paper]MaskFusion: Real-Time Recognition, Tracking and Reconstruction of Multiple Moving Objects
Before 近期在调研关于RGBD在室内移动机器人下的语义导航的研究.目前帝国理工的Andrew Davison在这边有两个团队在研究,分别是Fusion++ 和 这篇 MaskFusion.这篇是 ...
- PAT甲题题解-1002. A+B for Polynomials (25)-多项式相加
注意两点:1.系数也有可能加起来为负!!!一开始我if里面判断为>0导致有样例没过...2.如果最后所有指数的系数都为0,输出一个0即可,原本以为是输出 1 0 0.0... #include ...
- java锁经典示例——卖车票场景
场景:20张车票 3个窗口同时售票 1.不加锁 package com.yao.lock; /** * 不加锁的情况 */ public class Runnable_demo implements ...
- BugPhobia开发篇章:Beta阶段第VI次Scrum Meeting
0x01 :Scrum Meeting基本摘要 Beta阶段第六次Scrum Meeting 敏捷开发起始时间 2015/12/18 00:00 A.M. 敏捷开发终止时间 2015/12/18 23 ...
- Scrum Meeting day 2
第二次会议,开发人员会议 . • 前端: 1. 登陆界面,login, sign up, 添加加载时的图片. 2. 主界面:采用类微信类型.应含有联系人.群聊.设置 3. ...
- Confluence的简单安装以及与jira链接(Confluence不知道有没有破解)
1. 前提是安装好了jira以及下载好了confluence的安装包 这里 jira的版本是 7.2.4 confluence的版本是6.8 2. 服务器上面有sqlserver数据库. 3. 为了便 ...
- jquery无刷新文件上传 解决IE安全性问题
很多项目中都需要有文件上传的功能,一般文件上传有几种方式,input file表单上传,flash上传. flash就不说了,能接受flash的就用吧. 下面介绍的这种是基于input file控件的 ...
- DataSet和实体类的相互转换
最近做WInfrom项目,对表格和控件的数据绑定非常喜欢用实体类对象来解决,但是绑定以后 又怎么从控件中拿到实体类或者转换为datatable 或者dataset呢 经过在网上的搜索以及自己的改进 完 ...