Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
566 views
in Technique[技术] by (71.8m points)

c# - IIS 7.5, Web Service and HTTP 405 error

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

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

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

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.

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

Web service is built using WCF.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

  1. On IIS 7.5 -> YourWebsite -> Handler Mappings
  2. Choose "Add module mapping" option on the right side of the panel
  3. In "Request path" field enter *.wsdl
  4. In "Module" field enter "ProtocolSupportModule"
  5. Click on "Request restrictions" and go to Verbs tab
  6. Enter POST verb
  7. Save changes

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...