我想在我的Web Api
创建HttpDelete
服务,但它不工作,并给我follwoing错误HttpDelete不是在网络API工作
Handler "WebDAV" has a bad module "WebDAVModule" in its module list
我的服务代码如下
[HttpDelete]
public string DeleteItem(long itemId)
{
try
{
// Implementation goes here
}
catch (Exception ex)
{
throw ex;
}
}
我正在使用以下http请求使用Postman
插件使用HTTPDelete
方法
http://localhost:85/RM.Services/api/Item/DeleteItem?itemId=12
我用下面的配置在web.config
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
还来解决这个问题试图进行以下设置在web.config
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="WebDAVModule" />
</modules>
</system.webServer>
但没有工作对我来说会出现同样的错误
我试着通过以下步骤从IIS
中删除WebDav
- 去
Control Panel
然后Programs and Fetures
然后Turn windows features on or off
- 然后
Internet Information Services
然后World Wide Web Services
然后Common HTTP Features
- 然后取出
WebDav Features
在这种情况下,我收到404
错误
在这个问题上的任何帮助吗?
发布您的操作方法代码请 –
检查编辑问题 –
请在您要调用此操作的位置添加代码。 –