Is there a practical example or demo that walks you through creating a service and then breaking it because of improper versioning. Most examples I see on the web just tell you what it is, but don't walk you through a demo.
Dhananjay Kumar shows some code samples for data contract versioning on these blog posts:
http://debugmode.net/2010/10/03/versioning-in-wcf-data-contract-part-1-adding-new-members/
http://debugmode.net/2010/10/03/versioning-in-wcf-data-contract-part-2-missing-members/
There is also some guidance on MSDN with a bit of code about all around versioning in WCF:
http://msdn.microsoft.com/library/ff384251.aspx
Related
I want to use MassTransit bus with RabbitMQ. But I am not able to find a simple example. I am looking for example which will get me started.
What I have tried.
googled: But most the examples are using MSMQ or they using too many configuration options.
GitHub: I looked a the GitHub for MassTransit (https://github.com/MassTransit/MassTransit/tree/master/src/Samples) But the example here is heavily loaded. It's very hard to understand for beginners.
Reading docs: I have started reading docs but it will take some time before I finish it. I am hoping if someone shares a link to simple example which will get me started.
Please provide your suggestion.
Here's a simple, good pub-sub example using MassTransit and RabbitMQ both.
http://looselycoupledlabs.com/2014/06/masstransit-publish-subscribe-example/
In case the article link does not work, here's the link to the source code:
https://github.com/dprothero/MtPubSubExample
Thanks to the author of course!
MassTransit implements a lot of concepts and provides great many features with a very small surface API. There's no simple way to describe everything it does, because the problems it helps to solve are not simple, but an example can be made small.
Have a look at this sample I have for testing throughput:
https://github.com/et1975/Throughput-Test
The only "extra" that one might find unnecessary is Dependency Injection integration. You'd want one in most cases, but it does hide how certain bits interact.
Look at https://groups.google.com/forum/?fromgroups#!forum/masstransit-discuss for more help.
Cheers,
ET.
i am very new in WCF. so often gaze for wcf code & article. after viewing many code i often stuck for very basic things and got no elaborate discussion for the below question. so here are my few basic question....and looking for details discussion with sample situation and with sample code.
what is the meaning of UseSynchronizationContext=false
when one should turn on UseSynchronizationContext=true
or when one should go for UseSynchronizationContext=false ?
Its to do with whether, by default, WCF will attempt to use an existing thread synchronization context or not. There is an interesting question related to this here:-
WCF InstanceContextMode.Multiple issues
Also a codeproject posting about synchronizationcontext here:-
Understanding SynchronizationContext (Part I)
From the MSDN documentation it looks like the default for this is true.
I need to learn WCF for my project as I am building a client-server application under Windows. What's the best place to start. I've googled for tutorials and books but I couldn't find something suitable for starters. I would prefer a book.
As for resoures: there's the MSDN WCF Developer Center which has everything from beginner's tutorials to articles and sample code.
Also, check out the screen cast library up on MSDN for some really useful, 10-15 minute chunks of information on just about any topic related to WCF you might be interested in.
Look at PluralSight videos may be its easy way for you to start. Some of the videos are on MSDN for free.
Find book for yourself. For example this one could be easy to understand for beginner.
Look at WCF samples. Some samples can help you in learning.
If you prefer a good book, check out Programming WCF Services, 3rd Edition by Juval Lowy.
Other WCF book recommendations are listed in this question.
I'm working with WCF at the moment and attempting to implement a custom security model based around an API key and signature (similar to how Facebook/Flickr/OAuth etc. work).
There are a while bunch of classes like ServiceAuthorizationManager, SecurityToken, SecurityTokenValidator, IAuthorizationPolicy and so on, but I can't seem to find any documentation about how these work together or what the conceptual security model is for WCF.
I'm really looking for something that details how these classes fit and work together, so I can understand where to extract credentials, where to validate they are correct, where to decide what level of access to give them and so on. If there is a book I can buy about this stuff it would be even better, as all the WCF books I have found skip over all this stuff entirely.
Is there any documentation out there?
Take a look at Juval Lowy's excellent "Programming WCF Services," 2nd Edition:
Here's the link to Amazon's page on it.
Chapter 10 is completely devoted to security.
Microsoft has released a WCF Security Guide - a free(!) eBook. You can find it here.
That's an awful lot of information to wade through. Good luck!
I'm starting to work with my model almost exclusively in WCF and wanted to get some practical approaches to versioning these services over time. Can anyone point me in the right direction?
There is a good writeup on Craig McMurtry's WebLog. Its from 2006, but most of it is still relevant.
As well as a decision tree to walk through the choices, he shows how to implement those changes using Windows Communication Foundation
See "Versioning WCF Services: Part I" and "Versioning WCF Services: Part II".
See also:
WCF Backwards Compatibility and Versioning Strategies – Part 1
WCF Backward Compatibility and Versioning Strategies – Part 2
WCF Backward Compatibility and Versioning Strategies – Part 3
While not an instant answer for you, I found the book Learning WCF very useful; in it there's a small section on versioning (which is similar to Craig McMurtry's advice posted by Espo). If you're looking for a general intro book, it's very good. Her website has lots of good stuff too: Das Blonde
Edit:
No sure why her site isn't responding; it's been a while since I've visited, so maybe she shut it down. No sure.