WCF REST Web服务部署 [英] WCF REST web service deployment

查看:122
本文介绍了WCF REST Web服务部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WCF REST Web服务,该服务在Visual Studio开发服务器上可以正常运行,但是当我将其发布到DiscountAspNet服务器时失败.我正在Visual Studio中使用Web部署进行发布.

我已经尝试过复制参考文献.
并将身份验证设置为仅匿名.

我想念什么?

文件将被部署并通过目录浏览可见,但是当我测试GET和POST方法时返回404.

I have a WCF REST web service that works fine on Visual Studio development server but fails when I publish it to the discountAspNet server. I''m using web deploy in Visual Studio to publish.

I''ve tried copying references.
And set authentication to only anonymous.

What am I missing?

The files get deployed and are visible through directory browsing, but return 404 when I test the GET and POST methods.

推荐答案

请尝试以下操作:

http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic4 [ ^ ]

希望对您有帮助:)
Try this:

http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic4[^]

hope it helps :)


在这种情况下,通过将multiSiteBindingsEnabled ="true"添加到web.config解决了该问题:
In this case the problem was solved by adding multipleSiteBindingsEnabled="true" to the web.config:
<servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" />

在此处查看讨论:

http://stackoverflow.com/questions/561823/wcf-error-this-collection-contains-an-address-with-scheme-http [

See the discussion here:

http://stackoverflow.com/questions/561823/wcf-error-this-collection-already-contains-an-address-with-scheme-http[^]


这篇关于WCF REST Web服务部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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