Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations

Browse by Tags

All Tags » WCF » .NET (RSS)
Code Generation, SharedContracts and The Sneaky Bug
A short discussion ensued today on the topic of Code Generation tools like CodeSmith. Like Unit Testing, code generation is a topic that some people swear by and some reject out of hand. I'm sure this is mostly a question of getting used to the concept...
Posted: Aug 16 2006, 06:28 PM by AvnerK | with 4 comment(s)
Filed under: , ,
WCF Serialization Part 2d: A Solution, a Conclusion and a Contribution
This is the last part of my continuing saga of serializing dictionaries over WCF and beyond. Quick recap: While WCF allows me to serialize an IDictionary easily, trying to serialize that dictionary later for other uses fails - specifically, caching it...
WCF Serialization part 1: Interfaces, Base classes and the NetDataContractFormatSerializer
One of WCF's goals is interoperability with standard protocol stacks, like WSE or other WS-* implementations. This led, I am told, to the design of WCF's default object serializer - the DataContractFormatSerializer. This handy little engine serializes...
WCF and Non-polymorphic bindings
I've been using WCF for the past few months and on the whole, I think the programming model works. I'm getting to really like the extensibility model and the whole deal seems to click rather well. One place where I feel it's a bit broken,...
Posted: Jul 31 2006, 09:06 AM by AvnerK | with 6 comment(s)
Filed under: , ,
My Singleton is disappearing!
WCF's Instance Context model allows me to specify my service's instantiation behavior - I can get a new instance for every call, have WCF manage a session for me and keep an instance per session, or just get lazy and have my service instantiated as a...
Posted: Jun 19 2006, 05:29 PM by AvnerK | with no comments
Filed under: , ,
Context-Bound Thread Queuer - FunFun.
As I mentioned in my previous post, I have a need to consistently pass an operation context to any thread I choose to spin. Doing so manually, as I did here, involves a lot of ugly, repetitive code for every thread. A lot of room for mistakes and bugs...
OperationContext is ThreadStatic
WCF Services tend to be big, heavy duty things. When I write a service I often want it to do a lot of work for a lot of clients, and it should do it efficiently. This usually means that I will use multithreaded code to get things done concurrently. Whether...
Share your interfaces - avoid static proxies.
When using WCF services, we have several options for creating the proxies. We can create them statically using SVCUTIL or the build-in IDE support (Add Service Reference...), or we can generate them dynamically using the ChannelFactory<T> or GenericProxy<T>...
Posted: May 17 2006, 03:24 PM by AvnerK | with 5 comment(s)
Filed under: , ,
Deperplexing WCF errors pt. 3 - Interfaces and KnownTypes
Another error message that stumped me today (after I had removed the IsOneWay parameter and actually got to see it) was the following exception: System.ServiceModel.CommunicationException The server did not provide a meaningful reply; this might be caused...
Deperplexing WCF errors pt. 2 - IsOneWay swallowing exceptions
The first step in understanding WCF error messages is making sure you actually get them. You can have an OperationContract defined with the IsOneWay parameter set to True, thus optimizing it by not requiring a reply message. Since faults and exceptions...
Posted: May 16 2006, 03:28 PM by AvnerK | with 2 comment(s)
Filed under: , ,
More Posts Next page »