开发者

Change WCF Service Binding From basichttp to nettcp

What is the easiest way of changing the binding of a WCF service from开发者_如何学运维 basichttp to nettcp? Surely you don't have to edit the file manually as there is just too much scope for error.


I recommend using the WCF Service Configuration Editor if you want to avoid errors introduced with manual editing.


You have to edit some file. It depends on how you define your binding. If you defined it via config, you'll need to change it (from <endpoint binding="basicHttpBinding" ...> to <endpoint binding="netTcpBinding" ...>). If you define it via code, you'll need to change the sourcfe code (from new BasicHttpBinding() to new NetTcpBinding()). Besides this change, that should be it (provided that the service has a base address for the net.tcp protocol as well).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜