IIS 7.5,Web服务和HTTP 405错误 [英] IIS 7.5, Web Service and HTTP 405 error

查看:2131
本文介绍了IIS 7.5,Web服务和HTTP 405错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的机器上托管的Web服务。我使用的是Windows 7和IIS 7.5。

I have a web service which I host on my machine. I use Windows 7 and IIS 7.5.

问题:当客户端尝试使用的Web服务,他/她得到一个HTTP 405错误

Problem: When the client tries to consume the web service, he/she gets a HTTP 405 error.

在IIS的日志文件,我可以看到,这是拒绝了,因为POST谓词是不允许的。

In the log file of IIS, I can see that this is refused because POST verb is not allowed.

:我怎样​​才能让POST谓词这些请求结果
我一定要添加WSDL文件的映射?如果我这样做,我怎么有配置这种映射?我已经检查,并在现有的映射我什么都没有了WSDL扩展。

Question: How can I allow POST verb for those requests?
Do I have to add mapping of the WSDL file? And if I do, how do I have to configure this mapping? I have checked, and in existing mappings I have nothing for WSDL extension.

有可能还有一点要在IIS设置为允许这些请求?

Is there maybe another thing to setup on IIS to allow those requests?

Web服务使用内置的 WCF

Web service is built using WCF.

推荐答案

在挣扎几个小时,这是最终的解决方案,帮助我(从小提琴手测试):

After hours of struggling, this is final solution that helped me (tested from fiddler):


  1. 在IIS 7.5 - > YourWebsite - >处理程序映射

  2. 选择添加模块映射选项,在面板的右侧

  3. 在请求路径字段中输入*的.wsdl

  4. 在模块栏中输入ProtocolSupportModule

  5. 单击请求限制,进入动词标签

  6. 输入POST谓词

  7. 保存更改

结束瞧,小提琴手不再与405,但与快乐200的答案。

End voila, fiddler no longer answers with 405 but with happy 200.

这篇关于IIS 7.5,Web服务和HTTP 405错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆