Question : WCF Question

I am new to WCF so I read around the internet. I found (at least) 3 ways to make a WCF service, but I don't know the difference.


Using Channel Factory:
http://weblogs.asp.net/ralfw/archive/2007/04/14/a-truely-simple-example-to-get-started-with-wcf.aspx

Using Service Reference:
http://bloggingabout.net/blogs/dennis/archive/2007/04/20/wcf-simple-example.aspx

Using svcutil to generate proxy for client:
http://www.codeproject.com/KB/WCF/WCFWPFChat.aspx


What are the advantages/disadvantages of using each method?

TIA

Answer : WCF Question

1. SvcUtil.exe creates 2 files (proxy and app.config). Does that mean that I will need to manually regenerate the files every time there are changes to the service?

If your Service details (like name of the operationcontract or servicecontract) or parameters changes, yes you have to regenerate the proxy.. and app.config (The app.config will be used by the client)

2. Does that mean that it is best to use the ChannelFactory if I have binary reference to the Service Contract?

ChannelFactory allows you to dynamically create a proxy object based on servicecontract. So, if your service is going to keep changing then ChannelFactory might be a good choice. Provided your service is going to be WCF Service only.
If you have binary reference, then you can go for ChannelFactory.

-Ajitha
Random Solutions  
 
programming4us programming4us