Bits and Pieces

Bits and Pieces

Tools and Code by Avner Shahar-Kashtan

Home Archive Categories Tags Blog Tools & Projects About Me RSS
  • Context-Bound Thread Queuer - FunFun.

    2006-05-19 Avner Shahar-Kashtan Miscellaneous Debris
    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 …
  • OperationContext is ThreadStatic

    2006-05-18 Avner Shahar-Kashtan Miscellaneous Debris
    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 …
  • Share your interfaces - avoid static proxies.

    2006-05-17 Avner Shahar-Kashtan Miscellaneous Debris
    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 …
  • Deperplexing WCF errors pt. 3 - Interfaces and KnownTypes

    2006-05-16 Avner Shahar-Kashtan Miscellaneous Debris
    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 …
  • Deperplexing WCF errors pt. 2 - IsOneWay swallowing exceptions

    2006-05-16 Avner Shahar-Kashtan Miscellaneous Debris
    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 …
  • Deperplexing WCF errors pt. 1 - CommunicationObjectAbortedException for security mismatch

    2006-05-15 Avner Shahar-Kashtan Miscellaneous Debris
    As a follow-up to this post: another reason why we get CommunicationObjectAbortedExceptions is because our client channel definition does not send any credentials (using a binding that has the SecurityMode set to None) while the service is …
  • System.Reflection.Omit

    2006-05-15 Avner Shahar-Kashtan Miscellaneous Debris
    In TechEd Israel 2006, I listened to Roy Osherove’s excellent talk on the new reflection features in .NET 2.0 - a great assortment of topics on things ranging from DynamicMethods to the ReflectionOnly- set of properties. One of the …
  • Indigo Errors Perplexing

    2006-05-08 Avner Shahar-Kashtan Miscellaneous Debris
    I was writing a very simple WCF service. Nothing fancy - just returning an array of structs via TCP, just like 3 others already implemented. Started testing, stepped through the server code, returned the value from the service interface, …
  • One-Click Wonder

    2006-05-07 Avner Shahar-Kashtan Miscellaneous Debris
    It turns out that you can easily close a tab with one click on the middle mouse button. On most modern mice, this would be the scroll wheel button. No fuss, no right-clicking, no selecting the tab and going to the other end of the screen …
  • A new conditional assignment operator??

    2006-05-04 Avner Shahar-Kashtan Miscellaneous Debris
    This one may have slipped beneath the radar, with all the new .NET 2.0 and WinFX and other improvements and APIs and language changes. It appears that C# 2.0 adds a new operator to the mix, and I never even knew it was there. The operator …
  • Serializing a Binding object - TimeSpan serialization error.

    2006-04-30 Avner Shahar-Kashtan Miscellaneous Debris
    Seeing as our project is all distributed and stuff, with various services possibly running on different servers, we wanted to have the whole service address business be flexible, and not rely on hardcoded values in app.config files. We have …
  • VSS and mapped file locations

    2006-04-27 Avner Shahar-Kashtan Miscellaneous Debris
    Just a quick tip about the some new problems we’re having with VSS: To ease integration and control, all developers on the team have their local development drive mapped to drive P:, to make sure all file references are consistent …
  • Adding custom headers to every WCF call - a solution

    2006-04-26 Avner Shahar-Kashtan Miscellaneous Debris
    At last, a solution presented itself. While I must admit that at first I was very skeptical of the extensibilty model for WCF which seemed far too involved and complicated, but after implementing a simple extension I must say it’s …
  • How do I add a custom header to every WCF message?

    2006-04-25 Avner Shahar-Kashtan Miscellaneous Debris
    One thing I still haven’t managed to do is create my proxy in such a way that a custom header is added to every call that is made through that proxy. Currently, this is done by instantiating a new OperationContext around each call …
  • Adding custom headers to a WCF message - Jan CTP

    2006-04-25 Avner Shahar-Kashtan Miscellaneous Debris
    Guy Burstein, again, writes about adding custom headers to a call made by a WCF proxy. This is all very nice and well, but his code only works with the Feb. CTP of WCF, while I’m still using January here. The differences seemed subtle …
  • VSS2005 - staying in line

    2006-04-24 Avner Shahar-Kashtan Miscellaneous Debris
    Working with Visual SourceSafe always feels to me like walking on eggshells. One wrong move and you get that sickening crunching feeling and things seem to collapse. My current project’s integrator decided to keep things neat. …
  • Genericizing the GenericProxy<T>

    2006-04-23 Avner Shahar-Kashtan Miscellaneous Debris
    A few days ago, Guy Burstein wrote a entry on avoiding design-time generated proxies by extending the ClientBase class to create a GenericProxy. This proxy uses the client binding data in the app.config file to auto-create an appropriate …
  • Creating metadata from WCF executables

    2006-04-09 Avner Shahar-Kashtan Miscellaneous Debris
    So I’ve started messing around with WinFX and WCF. It certainly feels like it needs more work, especially on the dev-tool end of things. I was trying to run SvcUtil to generate metadata and proxy from a console application and ran …
  • Problems I've encountered today when installing the WinFX January 2006 CTP

    2006-04-06 Avner Shahar-Kashtan Miscellaneous Debris
    1)<span style=“font-family: " new=”" roman="" font-style="" normal="" font-variant="" normal="" font-weight="" normal="" font-size="" …
  • Kerberos and Web Service Preauthentication

    2006-02-13 Avner Shahar-Kashtan Miscellaneous Debris
    My current project has been having various inconsistent, irreproducible 401 Unauthorized errors on our web service calls. We tried various tests, checks, changes and wild guesses, and we think we’ve landed it this time. Let’s recap the …
← Newer
6 / 10
Older →

Bits and Pieces — Tools and Code by Avner Shahar-Kashtan