C# – WCF or HttpWebRequest – Which to Use

cnetwcfweb services

I would like to access to multiple web services with a WPF application (Facebook, Twitter, etc…).

I'm not familiar at all with WCF and I was wondering what should I use and why (pros and cons) ? WCF or something else more traditional (like HttpWebRequest) ?

Best Answer

Go with WCF! It's the way to go, it's the present and future of Microsoft's "connected systems" strategy. You can attach to just about anything using WCF - and contrary to Khalid, I don't think it has a really high learning curve.

Get yourself a good book - I recommend Learning WCF by Michele Leroux Bustamante - check out her samples, play with those.

Also check out online resources:

That should easily get you started! There's a ton more stuff out there.

Watch those two DNR-TV screen casts - they show how to really understand what is needed in terms of WCF configuration. It's really not rocket science! But unfortunately, the "Add Service Reference" and svcutil.exe both have a tendency to create awfully and overly complicated configs - that's not necessary.

More online resources for WCF REST and Twitter: