<p>I understand the value of the three-part service/host/client model offered by WCF. But is it just me or does it seem like WCF took something pretty direct and straightforward (the ASMX model) and made a mess out of it? </p>

<p>Is there an alternative to using SvcUtil's command line step back in time to generate the proxy? With ASMX services a test harness was automatically provided; is there a good alternative today with WCF? </p>

<p>I appreciate that the WS* stuff is more tightly integrated with WCF and hope to find some payoff for WCF there, but geeze, otherwise I'm perplexed. </p>

<p>Also, the state of books available for WCF is abysmal at best. Juval Lowy, a superb author, has written a good O'Reilly reference book "Programming WCF Services" but it doesn't do that much (for me anyway) for learning now to use WCF. That book's precursor (and a little better organized, but not much, as a tutorial) is Michele Leroux Bustamante's Learning WCF. It has good spots but is outdated in place and its corresponding Web site is gone. </p>

<p>Do you have good WCF learning references besides just continuing to Google the bejebus out of things?</p>

[{'answer_id': 50122, 'author': 'Ben Collins', 'author_id': 3279, 'author_profile': 'https://Stackoverflow.com/users/3279', 'pm_score': 1, 'selected': False, 'text': '<p>MSDN?  I usually do pretty well with the Library reference itself, and I usually expect to find valuable articles there.</p>\n'}, {'answer_id': 50139, 'author': 'Dave Ward', 'author_id': 60, 'author_profile': 'https://Stackoverflow.com/users/60', 'pm_score': 2, 'selected': False, 'text': '<p>I don\'t see it mentioned often enough, but you <strong>can</strong> still implement fairly simple services with WCF, very similar to ASMX services.  For example:</p>\n\n<pre><code>[ServiceContract]\n[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]\npublic class SimpleService\n{\n    [OperationContract]\n    public string HelloWorld()\n    {\n        return "Hello World";\n    }\n\n}\n</code></pre>\n\n<p>You still have to register the end point in your web.config, but that\'s not so bad.</p>\n\n<p>Eliminating the verbosity of the separated data, service, and operation contracts goes a long way toward making WCF more manageable for me.</p>\n'}, {'answer_id': 50185, 'author': 'Domenic', 'author_id': 3191, 'author_profile': 'https://Stackoverflow.com/users/3191', 'pm_score': 1, 'selected': False, 'text': "<p>In terms of what it offers, I think the answer is compatibility. The ASMX services were pretty Microsofty. Not to say that they didn't try to be compatible with other consumers; but the model wasn't made to fit much besides ASP.NET web pages and some other custom Microsoft consumers. Whereas WCF, because of its architecture, allows your service to have very open-standard--based endpoints, e.g. REST, JSON, etc. in addition to the usual SOAP. Other people will probably have a much easier time consuming your WCF service than your ASMX one.</p>\n\n<p>(This is all basically inferred from comparative MSDN reading, so someone who knows more should feel free to correct me.)</p>\n"}, {'answer_id': 50195, 'author': 'Quibblesome', 'author_id': 1143, 'author_profile': 'https://Stackoverflow.com/users/1143', 'pm_score': 3, 'selected': False, 'text': '<p>Wait.... did you ever use .NET Remoting, cause thats the real thing its replacing. .NET Remoting is pretty complicated itself. I find WCF easier and better laid out.</p>\n'}, {'answer_id': 138644, 'author': 'Karl', 'author_id': 15157, 'author_profile': 'https://Stackoverflow.com/users/15157', 'pm_score': 4, 'selected': False, 'text': '<p>WCF is much more powerful than ASMX and it extends it in several ways. ASMX is limited to only HTTP, whereas WCF can use several protocols for its communication (granted, HTTP is still the way most people will use it, at least for services that need to be interoperable). WCF is also easier to extend. At least, it is possible to extend it in ways that ASMX cannot be extended. "Easy" may be stretching it. =)</p>\n\n<p>The added functionality offered by WCF far outweighs the complexity it adds, in my opinion. I also feel that the programming model is easier. DataContracts are much nicer than having to serialize using XML serialization with public properties for everything, for example. It\'s also much more declarative in nature, which is also nice.</p>\n'}, {'answer_id': 138653, 'author': 'blowdart', 'author_id': 2525, 'author_profile': 'https://Stackoverflow.com/users/2525', 'pm_score': 2, 'selected': False, 'text': "<p>If you're using VS2008 and create a WCF project then you automatically get a test harness when you hit run/debug and you can add a reference without having to use svcutil.</p>\n"}, {'answer_id': 138681, 'author': 'ZombieSheep', 'author_id': 377, 'author_profile': 'https://Stackoverflow.com/users/377', 'pm_score': 2, 'selected': False, 'text': '<p>VS2008 includes the "Add Service Reference" context menu item which will create the proxy for you behind the scenes.</p>\n\n<p>As was mentioned previously, WCF is not intended solely as a replacement for the ASMX web service types, but to provide a consistent, secure and scalable methodology for all interoperable services, whether it is over HTTP, tcp, named pipes or MSMQ transports.</p>\n\n<p>I will confess that I do have other issues with WCF (e.g. re-writing method signatures when exposing a service over basicHTTP - see <a href="https://stackoverflow.com/questions/5863/c-wcf-service-backward-compatibility-issue">here</a>, but overall I think it is a definite imrovement</p>\n'}, {'answer_id': 350024, 'author': 'Saab', 'author_id': 33110, 'author_profile': 'https://Stackoverflow.com/users/33110', 'pm_score': 4, 'selected': False, 'text': "<p>I'm having a hardtime to see when I should or would use WCF. Why? Because I put productivity and simplicity on top of my list. Why was the ASMX model so succesful, because it worked, and you get it to work fast. And with VS 2005 and .NET 2.0 wsdl.exe was spitting out pretty nice and compliant services.</p>\n\n<p>In real life you should have very few communication protocols in your architecture. This keeps it simple an maintainable. If you need to acces to legacy systems, write specific adapters for them so they can play along in the nice shiny and beautiful SOA world.</p>\n"}, {'answer_id': 350652, 'author': 'Kwal', 'author_id': 35220, 'author_profile': 'https://Stackoverflow.com/users/35220', 'pm_score': 1, 'selected': False, 'text': '<p>WCF should not be thought of as a replacement for ASMX. Judging at how it is positioned and how it is being used internally by Microsoft, it is really a fundamental architecture piece that is used for any type of cross-boundary communication.</p>\n'}, {'answer_id': 350720, 'author': 'pglowack', 'author_id': 15733, 'author_profile': 'https://Stackoverflow.com/users/15733', 'pm_score': 1, 'selected': False, 'text': '<p>I believe that WCF really advances ASMX web services implementation in many ways. First of all it provides a very nice layered object model that helps hide the intrinsic complexity of distributed applications. \nSecondly you can have more than request-replay messaging patterns, including asynchronous notifications from server to client (impossible with pure HTTP), and thirdly abstracting away the underlying transport protocol from XML messaging and thus elegantly supporting HTTP, HTTPS, TCP and other. Backward compatibility with "1-st generation" web services is also a plus.\nWCF uses XML standard as the internal representation format. This could be perceived as advantage or disadvantage, especially with the growing popularity "fat-free alternatives to XML" like JSON.</p>\n'}, {'answer_id': 357897, 'author': 'Chris Porter', 'author_id': 13495, 'author_profile': 'https://Stackoverflow.com/users/13495', 'pm_score': 4, 'selected': False, 'text': '<p>I typically use Google to find my WCF answers and commonly find myself on the following blogs:</p>\n\n<p><strong>Blogs with valuable WCF articles</strong></p>\n\n<ul>\n<li><a href="http://blogs.msdn.com/drnick/default.aspx" rel="noreferrer">http://blogs.msdn.com/drnick/default.aspx</a></li>\n<li><a href="http://blogs.msdn.com/wenlong/default.aspx" rel="noreferrer">http://blogs.msdn.com/wenlong/default.aspx</a></li>\n<li><a href="http://blogs.thinktecture.com/buddhike/" rel="noreferrer">http://blogs.thinktecture.com/buddhike/</a></li>\n<li><a href="http://www.dasblonde.net/default.aspx" rel="noreferrer">http://www.dasblonde.net/default.aspx</a></li>\n</ul>\n\n<p><strong>Other valuable articles I\'ve found</strong></p>\n\n<ul>\n<li><a href="http://blogs.conchango.com/pauloreichert/archive/2007/02/22/WCF-Reliable-Sessions-Puzzle.aspx" rel="noreferrer">http://blogs.conchango.com/pauloreichert/archive/2007/02/22/WCF-Reliable-Sessions-Puzzle.aspx</a></li>\n<li><a href="http://blogs.msdn.com/salvapatuel/archive/2007/04/25/why-using-is-bad-for-your-wcf-service-host.aspx" rel="noreferrer">http://blogs.msdn.com/salvapatuel/archive/2007/04/25/why-using-is-bad-for-your-wcf-service-host.aspx</a></li>\n</ul>\n'}, {'answer_id': 357948, 'author': 'NoizWaves', 'author_id': 38438, 'author_profile': 'https://Stackoverflow.com/users/38438', 'pm_score': 2, 'selected': False, 'text': '<p>My initial thoughts of WCF were exactly the same! Here are some solutions:</p>\n\n<ol>\n<li>Program your own proxy/client layer utilising generics (see classes <a href="http://msdn.microsoft.com/en-us/library/ms576141.aspx" rel="nofollow noreferrer">ClientBase</a>, Binding). I\'ve found this easy to get working, but hard to perfect. </li>\n<li>Use a third party implementation of 1 (<a href="http://www.codeplex.com/SoftwareIsHardwork" rel="nofollow noreferrer">SoftwareIsHardwork</a> is my current favourite)</li>\n</ol>\n'}, {'answer_id': 403956, 'author': 'StingyJack', 'author_id': 16391, 'author_profile': 'https://Stackoverflow.com/users/16391', 'pm_score': 1, 'selected': False, 'text': '<p>The difficult things I find with WCF is managing the configurations for clients and servers, and troubleshooting the not so nice faulted state exceptions. </p>\n\n<p>It would be great if anyone had any shortcuts or tips for those.</p>\n'}, {'answer_id': 877642, 'author': 'Scott Arrington', 'author_id': 98877, 'author_profile': 'https://Stackoverflow.com/users/98877', 'pm_score': 7, 'selected': True, 'text': '<p>Okay, here we go.  First, Michele Leroux Bustamante\'s book has been updated for VS2008.  The website for the book is not gone.  It\'s up right now, and it has tons of great WCF info.  On that website she provides updated code compatible with VS2008 for all the examples in her book.  If you order from Amazon, you will get the reprint which is updated.</p>\n\n<p>WCF is not <em>only</em> a replacement for ASMX.  Sure it can (and does quite well) replace ASMX, but the real benefit is that it allows your services to be self-hosted.  Most of the functionality from WSE has been baked in from the start.  The framework is <em>highly</em> configurable, and the ability to serve multiple endpoints over multiple protocols is amazing, IMO.</p>\n\n<p>While you can still generate proxy classes from the "Add Service Reference" option, it\'s not necessary.  All you really have to do is copy your ServiceContract interface and tell your code where to find the endpoint for the service, and that\'s it.  You can call methods from the service with very little code.  Using this method, you have complete control over the implementation.  Regardless of the method you choose to generate a proxy class, Michele shows both and uses both in her <strong>excellent</strong> series of webcasts on the subject.</p>\n\n<p>Michele has tons of great material out there, and I recommend you check out her website(s).  Here\'s some links that were incredibly helpful for me as I was learning WCF.  I hope that you\'ll come to realize how strong WCF really is, and how easy it is to implement.  The learning curve is a little bit steep, but the rewards for your time investment are well worth it:</p>\n\n<ul>\n<li>Michele\'s webcasts:  <a href="http://www.dasblonde.net/2007/06/24/WCFWebcastSeries.aspx" rel="noreferrer">http://www.dasblonde.net/2007/06/24/WCFWebcastSeries.aspx</a></li>\n<li>Michele\'s book website (alive and updated for VS2008):  <a href="http://www.thatindigogirl.com/" rel="noreferrer">http://www.thatindigogirl.com/</a></li>\n</ul>\n\n<p>I recommend you watch at least 1 of Michele\'s webcasts.  She is a very effective presenter, and she\'s obviously incredibly knowledgeable when it comes to WCF.  She does a great job of demystifying the inner workings of WCF from the ground up.</p>\n'}, {'answer_id': 2423668, 'author': 'Ian Ringrose', 'author_id': 57159, 'author_profile': 'https://Stackoverflow.com/users/57159', 'pm_score': 1, 'selected': False, 'text': '<p>I find that is a pain; in that I have .NET at both ends, have the same "contract" dlls loaded at both ends etc.  But then I have to mess about with a lot of details like "KnownType" attributes.</p>\n\n<p>WCF also defaults to only letting 1 or 2 clients connect to a service until you change lots of configuration.   Changing the config from code is not easy, shipping lots of comfig files is not an option, as it is too hard to merge our changes into any changes a customer may have made at the time of an upgrade (also we don\'t want customers playing with WCF settings!)</p>\n\n<p>.NET remoting tended to just work most of the time.</p>\n\n<p>I think trying to <strong>pretend</strong> that .NET to .NET object based communications is the same as sending bit so of Text (xml) to an unknown system, was a step too far.  </p>\n\n<p>(The few times we have used WCF to talk to a Java system, we found that the XSD that the java system gave out did not match what XML it wanted anyway, so had to hand-code a lot of the XML mappings.)</p>\n'}, {'answer_id': 23482186, 'author': 'Babak.Abad', 'author_id': 2672788, 'author_profile': 'https://Stackoverflow.com/users/2672788', 'pm_score': 2, 'selected': False, 'text': '<p><strong>WCF</strong> is a replacement for all earlier <strong>web service</strong> technologies from Microsoft. It also does a lot more than what is traditionally considered as "web services".</p>\n\n<p>WCF "web services" are part of a much broader spectrum of remote communication enabled through WCF. You will get a much higher degree of flexibility and portability doing things in WCF than through traditional ASMX because WCF is designed, from the ground up, to summarize all of the different distributed programming infrastructures offered by Microsoft. An endpoint in WCF can be communicated with just as easily over SOAP/XML as it can over TCP/binary and to change this medium is simply a configuration file mod. In theory, this reduces the amount of new code needed when porting or changing business needs, targets, etc.</p>\n\n<p><code>ASMX is older than WCF, and anything ASMX can do so can WCF (and more)</code>. Basically you can see WCF as trying to logically group together all the different ways of getting two apps to communicate in the world of Microsoft; ASMX was just one of these many ways and so is now grouped under the WCF umbrella of capabilities.</p>\n\n<p>Web Services can be accessed only over HTTP &amp; it works in stateless environment, where WCF is flexible because its services can be hosted in different types of applications. Common scenarios for hosting WCF services are IIS,WAS, Self-hosting, Managed Windows Service.</p>\n\n<p>The major difference is that Web Services Use XmlSerializer. But WCF Uses DataContractSerializer which is better in Performance as compared to XmlSerializer.</p>\n\n<p><strong>In what scenarios must WCF be used</strong></p>\n\n<ul>\n<li>A secure service to process business transactions. A service that</li>\n<li>supplies current data to others, such as a traffic report or other</li>\n<li>monitoring service. A chat service that allows two people to</li>\n<li>communicate or exchange data in real time. A dashboard application</li>\n<li>that polls one or more services for data and presents it in a logical</li>\n<li>presentation. Exposing a workflow implemented using Windows Workflow</li>\n<li>Foundation as a WCF service. A Silverlight application to poll a</li>\n<li>service for the latest data feeds.</li>\n</ul>\n\n<p><strong>Features of WCF</strong></p>\n\n<ul>\n<li>Service Orientation</li>\n<li>Interoperability</li>\n<li>Multiple Message Patterns</li>\n<li>Service Metadata</li>\n<li>Data Contracts</li>\n<li>Security</li>\n<li>Multiple Transports and Encodings</li>\n<li>Reliable and Queued Messages</li>\n<li>Durable Messages</li>\n<li>Transactions</li>\n<li>AJAX and REST Support</li>\n<li>Extensibility</li>\n</ul>\n\n<hr>\n\n<p>source: <a href="http://www.codeproject.com/Articles/139787/What-s-the-Difference-between-WCF-and-Web-Services" rel="nofollow">main source of text</a></p>\n'}]
['https://Stackoverflow.com/questions/50114', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2536/']