IIS 6.0 preventing “PUT” & “DELETE” method types on WCF 4.0 web service calls (403 Forbidden)

北战南征 提交于 2019-12-21 20:26:18

问题


I am a developer trying to assist my server admin in figuring out how to get this issue corrected.

But I have an app that is using WCF 4.0 configure-less setup to make RESTful webservices calls. Everything works fine locally but when pushed to my server all PUT and DELETE requests return a 403 forbidden error.

After searching around I've been unable to find anything that seems to work, and I'm not sure if there is some logs that would help figure this out, I'm not a server guy and apparently neither is my "server guy". So any tips on where to point him or what might be causing this would be greatly appreciated.


回答1:


You would need to add the verbs to the appropriate handler on IIS 6. The below links explain on how to achieve it.

Steps as below: 1. Right click the Virtual Directory in IIS

  1. Select 'Properties'

  2. Click 'Configuration...'

  3. Search for .svc in the 'Application Extensions' list

  4. Select '.svc' (if this is not present, then you need to add it by clicking Add and using the same path for the executable as is used for the .aspx extension)

  5. Click 'Edit ...'

  6. In the 'Verbs' list select 'All Verbs'

Links:

  1. MSDN Forums

  2. Setting Application mapping on IIS 6



来源:https://stackoverflow.com/questions/10553575/iis-6-0-preventing-put-delete-method-types-on-wcf-4-0-web-service-calls-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!