[英]What to use as endpoint binding instead of wsHttpBinding (for Silverlight)
I created a WCF service that has functions that return IEnumerable collections. 我创建了一个WCF服务,其中包含返回IEnumerable集合的函数。 I added it to Silverlight 4.0 as a service reference, but it doesn't like it. 我将它添加到Silverlight 4.0作为服务引用,但它不喜欢它。
What endpoint binding could I use instead that would work in this scenario? 我可以使用哪种端点绑定代替在这种情况下工作? And, to change it, do I just change the web.config for my service? 而且,要更改它,我只是更改我的服务的web.config?
Thanks. 谢谢。
There are posibility to use TCP bindings, but I am not sure if you can do it on web based application. 有可能使用TCP绑定,但我不确定您是否可以在基于Web的应用程序上执行此操作。 But even web based applications have several options of HTTP bindings, say BASIC and as in your case WS HTTP bindings. 但即使是基于Web的应用程序也有多种HTTP绑定选项,比如BASIC,以及WS HTTP绑定。
You always and easy can switch it to any bindings in config file, or in C# code if you are running as self host app. 如果您作为自托管应用程序运行,您可以随时轻松地将其切换到配置文件中的任何绑定,或者转换为C#代码。 (without IIS) (没有IIS)
Try using basicHttpBinding
. 尝试使用basicHttpBinding
。 Disclaimer: This used to be true in earlier versions of Silverlight, I hope it still is. 免责声明:以前在Silverlight的早期版本中都是如此,我希望它仍然存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.