0
votes

i programmed a network-application with C#/WPF and used WCF with a TCP-Binding. I used this Tutorial: http://www.codeproject.com/KB/IP/WCFWPFChatRoot.aspx.

Now i want a Web-Client-Version. I tried to make the Web-Client with Silverlight, but if I add the Service-Reference, the compiler tells me, that Silverlight does not support TCP-Bindings.

Is it possible to change the Service to HTTP-Binding without writing a complete new Service?

EDIT: Maybe i can keep the TCP-Binding. Silverlight 4 supports TCP-Bindung (without security and sessions)

NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None, true);

I already use SecurityMode.None, but then i set the Session-Flag from true to false i still get warnings in VS... Whould my service work with no-session-mode? I use a callback-interface. Is that sessionhandling in WCF?

1

1 Answers

0
votes

Absolutely!

One of the advantages of WCF is that the different components of your service are (mostly) independent. You can change the binding without the changing the implementation, or visa versa and in most cases be just fine. Issues may arise if you are using the special features of a binding, but in most cases there will not be any problems.

In this case, update the configuration and you should be fine.