May 2007 - Posts - Willy-Peter Schaub's Cave of Chamomile Simplicity

May 2007 - Posts

Who is who in the Visual Studio Family? TFS versus VSTS ... TFS <> VSTS

During discussions at DevDays I have realized that a lot of community members are not sure what the various bits and pieces of VSTS and TFS are and more importantly that TFS is not the same as VSTS. In this "brief" post, I will try and outline the major differences and attempt to lift some of the confusion and fog.

Please take note that the view presented in this post is my personal view and not that of Microsoft.

Visual Studio Express EditionsVisual Studio 2005 Express

Audience: Hobbyist, Novice, Student, ...

The Microsoft Visual Studio Express Editions are intended for the hobbyist, novice and student developer. And there is more ... it can be obtained at no cost!

Visual Studio Standard EditionVisual Studio 2005 Standard

Audience: Standalone professional developer

The Microsoft Visual Studio Standard Editions are intended for the individual professional developer, delivering comprehensive support for just about everything that the more "professional" editions offer, with the exception of SQL Server Integration and "team" collaboration.

Visual Studio 2005 Professional EditionVisual Studio 2005 Professional

Audience: Standalone professional developer or small development teams

The Microsoft Visual Studio Professional Edition is intended for professional developers working alone or in small teams. The environment typically uses Source Safe for source control and 3rd party tools to integrate the development environment for collaborating developers in small teams.

Common Question: Can I use the professional edition with TFS? Yes, but you would need to purchase a Team Foundation Server client access license (TFS CAL), which is part of the team editions we will cover next.

Visual Studio 2005 Team SystemVisual Studio 2005 Team Edition (Professional + much, much more)

Audience: Standalone professional solution stakeholder (architect, developer, tester and database professional)

The key to understand is that any Team Edition, without the Team Foundation Server (TFS), which we will cover next, delivers a standalone environment, which can probably be compared with Visual Studio Professional on steroids. We have a number of team "editions" at our disposal:

Visual Studio Team Edition for Software Architects

Audience: Solution Architect, Solution Analyst

This is the one version which I always battle to position, because in the current 2005 version, the typical tools needed by an architect or analyst are simply not available. While the modelling tools are a great start, they have serious limitations when it comes to the design of solutions using the typical interoperability technologies, i.e. MSMQ, WCF, Sockets, Named Pipes ... essentially anything other than a database or web service. Evaluate this edition carefully before making the investment!

Visual Studio Team Edition for Software Developers

Audience: Solution Developer

This is the first powerhouse of the Team Edition Suite and delivers an integrated development environment that can only be admired and recommended. Tools such as code analysis, code coverage and performance tuning allow the developers to validate, profile and optimise their code, before dropping it into a build.

Common Question: Should I invest in the developer or tester edition? If your role and passion is development go for the developer edition and plug the minor holes with 3rd party add-ins.

Visual Studio Team Edition for Software Testers

Audience: Solution Tester and Quality Assurance

This edition delivers additional load testing tools for web applications and services, intended primarily for the tester and QA stakeholder who authors, executes and manages test scenarios.

Common Question: Where is the Load Agent? Separate edition ... see next point.

Visual Studio Team Test Load Agent

Audience: Solution Tester and Quality Assurance

Allows testers to generate supplementary test loads to simulate large number of users and testing the typical performance of web applications and services.

Visual Studio Team Edition for Database Professionals

Audience: Database Professional

The newest member of the Team Edition family finally delivers control over SQL Server databases throughout the entire development lifecycle. Change management, process integration, "visioning" and a more productive DBMS development environment makes this edition an exciting product.

Common Question: If I am a developer and involved with the DBMS as well ... a very common scenario ... should I get Edition for developers and database professionals? If you need 2 or more editions, go Team Suite ... although the price tag will shock many, it was more cost effective when we last checked the dynamic licensing and pricing models.

Visual Studio Team Suite

Audience: Professional Poweruser ... schizophrenic IT guru involved in two or more of the above mentioned roles and editions.

The Team Suite is the luxury "suite" at the top of the Team Edition empire. It allows team members to seamlessly work in one or more roles, i.e. architect, developer, tester and/or database professional. Although it delivers the maximum punch, best team collaboration and transparency within the SDLC, it needs to be reviewed carefully as it comes at a price.

explorerTeam Explorer

Audience: Users connecting to a Team Foundation Server

The Team Explorer is a separate install and product, used to connect your development environment to one or more Team Foundation Servers and associated Team Projects.

Common Question: I invested in and installed a Team Edition ... but cannot connect to or see Team Foundation Server (TFS) features. Why? Ensure that you install the Team Explorer after installing your Team Edition, which enables access to TFS and the associated menus.

Team Foundation Server (TFS)

Audience: Noone directly ... this is the engine room, hosted on the server and hidden away from the world. It is a server based product.

The Team Foundation Server is a server based solution that offers an integrated application life-cycle management (ALM), including source control, work item management, build management and much, much more.

Common Question: How do I upgrade from Visual Studio Professional to TFS? You don't ... you upgrade from professional to team edition and/or "optionally" connect to a Team Foundation Server.

TFS Best Practice Analyzer (BPA)

Ever wondered whether your server is suitable for TFS, whether your TFS installation was "really" successful, whether your TFS implementation is healthy or when the unthinkable happens ... why the installation failed?

After Microsoft released a number of successful and well-thought-through best practice analyzer tools, i.e. SQL Server BPA, BizTalk BPA, Exchange BPA and more recently a CodePlex based base BPA, the TFS BPA tool made its appearance on design whiteboards and discussions in good old Redmond, spearheaded by BillEss and a number of passionate TFS individuals.

The TFS BPA is not yet ready for public consumption, but will soon be available to Microsoft staff and Microsoft Most Valued Professionals (MVP), and hopefully soon thereafter for public consumption. The tool is simply amazing and powerful, bringing tears to those who have spent days and nights debugging a TFS issue, only to be told by the TFS BPA tool ... "do you know that your service XYZ is stopped?"

If you want to have your TFS environment checked with the pre-release tool then please let me know. Please advise if you are located in South-Africa, Gauteng region, in which case I can visit your site and run the tool. Alternatively we can make a plan to deliver the tool via the Microsoft support infrastructure.

Last thoughts ...

Make sure to visit the following sites for a detailed breakdown of the differences:

You will also find the above information summarized and visualized in some of our posters, which you can locate at http://www.drp.co.za. Have a look at the following posters to start off with: "0202 Microsoft Team System Editions", "0202 Microsoft Team System Project Planning" and "0202 Microsoft Team System Project Capacity Planning". There are many more, both in PDF and high-quality/scalable JPG formats.

Sample view of "0202 Microsoft Team System Editions" poster.

Posted by willy with 1 comment(s)

Team Development with Visual Studio Team Foundation Guide - PDF Version

Make sure to visit http://www.codeplex.com/TFSGuide/Release/ProjectReleases.aspx?ReleaseId=4442 to get your hands on the excellent BETA-1 version of the Team Foundation Server Best Practices Guide.

Posted by willy with 1 comment(s)
Filed under: , ,

Light Weight Scrum Process Template

We just released the “last” Beta version of the LWSPS and working feverishly (especially MikeA) on getting release 1.0 done. Please download it and take a look when give us your feedback.

What makes us Light Weight?

  • Usage of areas and iterations for sprints.   
  • Split out of backlog items from defects. 
  • Introduction of a user story work item type.
  • Introduction of review and impediment work items.
  • WI types that are optimized for the cube, with several default queries. 

Find it at http://www.codeplex.com/VSTSScrum.

Posted by willy with 1 comment(s)
Filed under: , ,

TFS/VSTS Best Practice Analyzer - Success Stories ... BPA Passion!

Using the latest drop of the TFS BPA tool, which will appear in the Power Tools one of these days, I was able to highlight and resolve two production implementation issues.

Case 1 ... TFS implementation which was apparently "ALL OK".

Why has no-one noticed that the disk space, hosting the TFS/WSS production databases has dwindled? Thanks BPA, the disk storage will now be upgraded "pro-actively", before we have a meltdown. 

Case 2 - An implementation which had ongoing issues with reports not updating ... remnants of a disaster recovery exercise?!?

 

Thanks to BPA it was noticed that both the SPTimer and the TFSServerScheduling services were not operational ... incorrect credentials. Thanks BPA, may the services resume their rightful duties!

Conclusion

Using the BPA tool is as simple as point to server, run analysis, review analysis and fix it ... "FiFi (Find It Fix It)" comes to mind.

The simplicity for the operational environment, yet extensive analysis and feedback is what makes me so passionate about this tool!

Posted by willy with 1 comment(s)
Filed under: , , ,

Zune ... a device to fall in love with.

BillEss., the Zune was a huge success when my son finally received it on his birthday ... thank you very much for assisting me during he sabbatical to purchase one of these "magical devices".

For those more focused on iPods, the Zune is a digital audio player from Microsoft, capable of playing music and videos, displays images, receive FM radio and much, much more. The 30GB disk allows storage of 20+ movies, which required a few software packages to convert DVD to MPEG to WAV ... but well worth the effort.

What I love about this device is that you plug it in, the plug-play manager wakes up and does the rest, and 15 minutes after unpacking my son was listening to music, copying movies and generally having a huge smile on his face.

Posted by willy with 10 comment(s)
Filed under:

From the future back to the past, using the future ... MS IDE/VSTS "Rocks"

For my latest UNISA assignment I had to write an assembly program, which is currently sitting at 251 lines of code. Tired of plodding in the dark, fighting with CMD Edit and scratching my head to bring my assembler memories from the 80's back to short-term memory, I decided to edit the assembly source in Visual Studio 2005, used the Platform SDK online help as reference and finally MASM611 as the home for my "16-bit" program. Within a matter of 2 hours I coded, debugged, tested and completed my assembly assignment program. The latest Orcas1 Beta release of VS.NET did not seem to mind my excursion to the past and the tools supported me all the way ... this is the reason why I simply love this stuff!

Posted by willy with no comments

Book 3 - Software Engineers on their way to Pluto: We need your comment(s)!

We need your feedback in terms of our third book, which has gone into final revision. A "DRAFT" extract, including the first few chapters and the chapter on the Lightweight Scrum Process Template, can be found as a download at http://www.drp.co.za/Media/Books/tabid/67/Default.aspx under the item "Software Engineers on their way to Pluto" at the bottom.

Your comments would be appreciated in terms of the following queries ... please add comment to this post, whereby comments will be treated in confidentiality and not published:

  1. Does the book focus on an important topic?
  2. Should the book be included in developer readiness boot camps and training?
  3. Do you agree with the review of the developer as below? Please elaborate.
  4. Are the New Horizon books (book1: Best Practices for the Connoisseur, book2: Interoperability for the Connoisseur) focused on and consolidating experience from the field, for the community, of a high quality?

Review from developer:

"I enjoyed the book a great deal. It was interesting to read and rather addictive. There is a lot of information and food for thought that is explained in a very easy to read way. It is easy to understand and I think that even if you are totally clueless you would walk away with something from this book. I am certainly re-looking the way I work, it inspired me to go the extra mile and make sure that the products we deliver are worthy of going to Pluto and back. The storyline was pretty cool and even though I am not exactly what you would call a “space” guru, I think that it was far from over the top. Even if you have no interest in space at all you will find it a fun book to read. Good humour as well. Thank you for giving me the opportunity to read your book."

Overview of book:

This book continues the discussion and sharing of best practices we introduced with the books “.NET Enterprise Solutions … Best Practices for the connoisseur, ISBN: 0-620-33013-9” and NET Enterprise Solutions … Interoperability for the Connoisseur, ISBN: 0-620-234680-9. Unlike its predecessors this book is not focused on technology, but instead takes a critical look at how we are typically building information technology solutions, the way we define the modus-operandi of the team and the product life cycle.

  • Why are so many solutions failing before they reach a “happy” client?
  • Why are so many solution teams stressed before they ship their solution?

We do not have the answer and will probably never find the necessary oracle … but we will nevertheless take a look at four typical software solution teams, building their own spaceship and flying to Pluto therein in search for answers.
Also featured is the Lightweight Scrum Process Template for the Team Foundation Server (TFS) developed by the community, for the community.

ISBN
978-0-620-38514-5

Posted by willy with 1 comment(s)

TFS/VSTS Orcas Beta-1 Feedback

General Summary

I have been working with Beta-1 since April, when I used beta-1 before it was released during the TFS BPA sabbatical. This is my first consolidated feedback report of the Orcas software ... all comments are my personal impressions and comments!

  • Stability ... to date I have had one meltdown issue with the debugger and some instability around performance session comparisons, otherwise the Beta-1 release has proven rock-solid for what I am doing.
  • Conversion wizard ... converts previous solutions effortless, including solutions containing a mix of managed and unmanaged code.

IDE Debugger Lab ... within Orcas

We developed an extensive lab demonstrating coding, debugging, code analysis and performance analysis of solutions in Visual Studio. Using the identical lab manual and code base, I came to the following conclusions:

  1. Code Analysis
    • No issues here ... developers will continue to get the same fright looking at all the warnings. Most, however, are worth investigating, especially around performance and security.
  2. Class Modeling
    • If only one could right click a solution , select class model and generate a class model for an entire solution.
  3. Code Coverage
    • No issues here ... same code coverage benefits as seen from previous versions.
       
  4. Code Metrics (NEW FEATURE)
    • This is a new feature ... select solution or project, right click and select "Code Metrics.
    • The result is a code analysis of all managed code ... would be nice to see unmanaged code included ... which gives the technical stakeholders of the solution an in-sight into the "maintainability" of the solution.
    • What does it mean?
      • Maintainability Index – An index value between 0 and 100 representing the maintainability of the code. High is good, low is bad.
      • Cyclomatic Complexity – Measurement of the structural complexity of the code, created by calculating the number of different code paths in the flow of the program. High implies  that more tests are needed to achieve good code coverage and will likely be less maintainable.
      • Depth of Inheritance – Number of class definitions that extend to the root of the class hierarchy. Deep hierarchies indicate more difficult and less maintainable code.
      • Class Coupling – Good maintainable software strives for tight cohesion and low coupling, hence low is good. This stats is measured through the coupling to unique classes through parameters, local variables, return types, method calls, generic or template instantiations, base classes, interface implementations, fields defined on external types, and attribute decoration.
      • Lines of Code – Indicates the approximate number of IL lines of code. High counts could indicate that methods are hard to maintain.
    • What is interesting to see is that the Microsoft base code is included in the code analysis and in some cases I was scratching my head as to why certain results were as they were ... in some cases indicating complexity and low maintainability.
  5. Profiling (ENHANCED FEATURE)
    • At a first glance the performance information is as overwhelming as ever, BUT, the reports shows a more consolidated view and for those of us wanting to determine whether code changes have made a difference, the comparison of performance session is a "cool" and productive feature.
       
    • When working with the comparison report, the export options available in the individual performance views are dearly missed!

TFS ... on which "possible" feature improvements should we keep an eye on?

In discussions with the Orcas release for TFS is often referred to as minor release. It is, however, important that we summarize the improvements ... which are everything but minor ... as currently defined by the Orcas release:

  1. Continuous Integration and Build Improvements
    • Multi-threaded builds with the new MSBuild.
    • Build queuing and queue management
    • Drop management ... policies used to define when builds are automatically deleted
    • Build trigger configuration, i.e. build on checkin, rolling build, ...
    • Improved abilities to
      • specify what source, versions of source, etc to include in a build.
      • manage multiple build machines.
      • specify what tests get run as part of a build
  2. Version Control Improvements
    • Destroy ... ability to manage and destroy items from the version control system to reduce disk usage.
    • Annotate ... allows developers to inspect a source code file and see at line-by-line level of detail who last changed each section of code.
    • Folder Diff ... compare operations on folders, which is useful when identifying differences between branches, local file changes and historical file changes.
    • Get Latest on Checkout ... force Team Foundation Server to always download the latest version of a file when you check it out.
    • Workspace mapping enhancements improve flexibility in client mappings and simplicity in definition, i.e. support mapping a folder or file under a cloaked folder and wildcard mappings so that you can map all files in a folder without mapping sub folders.
    • Performance improvements
    • Scale improvements
  3. Data Warehouse Improvements
    • Sync large groups (>30K users) to improve handling of large groups of users
    • SQL named instances to share a SQL server between multiple SQL instance
    • Support for alternative websites and ports to conform with enterprise policies
    • Support for client certificates
  4. SharePoint 2007
    • Support for WSS2007
    • Use of a separate SharePoint farm

Conclusion

  • Support for existing features and look and feel                             q;-)                 happy
  • Stability                                                                                   q;-)                 happy
  • Support for unmanaged code (the new features)                           q;-|                 pondering     
  • New features and enhancements
    • Code Analysis                                                                q;-) q;-)           very happy
    • Profiling                                                                          q;-) q;-)           very happy
  • TFS ... new features                                                                  q;-)                 happy
Posted by willy with 3 comment(s)

Microsoft "Interoperability by design" event

http://www.microsoft.com/southafrica/images/invitations/interop/interopheader.jpg

Microsoft approaches interoperability by design which strives for greater ‘out of the box’ connectivity for our customers and partners. Interoperability by design entails not only engineering excellence in our products, but also includes community collaboration with customers, partners, and competitors; providing access to our technologies by engaging in standards-setting activities.

The expected outcomes not only include better software, but also entire industry frameworks that drive greater efficiency among businesses and government entities.

Objectives for the roundtable:

  • Understand the difference between Open Standards and Open Source
  • Innovation and Interoperability
  • Standards and Open Content
  • The difference between Interoperability and Interchangeability.

Don't miss it! 24th May 2007, Microsoft Auditorium

Snippet of the Agenda

"Why Interoperability?" - (Ashley de Klerk, Public Sector Director, Microsoft South Africa)

"Essence of the Interoperability Roundtable: Enabling Service Delivery" – (Potlaki Maine, National Technology Officer, Microsoft South Africa)

"Myths Legends and Interoperability Reality"– (Roy Blume, IT Research Manager, BMI-T)

"Innovation and Interoperability: the Microsoft Story" - (Simon Harris, DPE Advisor and Cyril Belikoff IW Group Executive , Microsoft South Africa)

"Novell and Microsoft – how Interoperability builds bridges" – (Stafford Masie, Managing Director, Novell South Africa)

"Microsoft – Open for Business" (Paulo Ferreira, Platform Strategy Manager, Microsoft South Africa)

Reserve your seat now! Click here to register, or call 0860 2255 67

http://www.microsoft.com/southafrica/images/invitations/interop/footer.gif

Posted by willy with no comments
Filed under:

TFS BPA - "FiFi" Quick Reference Poster

The first version of the FiFi quick reference poster for the TFS BPA tool, as mentioned in TFS BPA ... the ambitious journey and a quest to release an invaluable tool, has been published on www.drp.co.za under media in both PDF and high-quality JPG formats.
Posted by willy with no comments

WCF - FaulException and the frustrating road to "exception" resolution

This is probably the third posting on FaultContracts and the often painful journey to ensure that the client receives a known and manageable FaultException. Some observations we have made while enhancing our FaultContract proof of concept code:

  1. Assume that a consumer calls Service A, which in turn calls Service B. Service B executes a division by 0 statement which raises an DivideByZeroException. Both Service A and Service B have a FaultContract<DivideByZeroException> defined for the methods in question. Service B catches the DivideByZeroException and throws a new FaultException, including the caught exception. This exception is caught by Service B as the correct FaultContract<DivideByZeroException>.
    • If Service A re-throws the FaultException using "throw" of "throw e", the consumer receives a CommunicationException.
    • If Service A creates a new FaultException, including the detail of caught exception and then throws it, the consumer receives a FaultException<DivideByZero> ... the expected behaviour as the FaultException is tried to a service contract, although not intuitive for the developer catching and re-throwing the exception.
  2. If an exception is not serialisable, but defined as part of a DataContract, the service loads, but any attempt to generate a proxy fails with an exception that the exception cannot be serialised. Why not catch it slightly earlier, i.e. while defining the contract or at least when the service loads.
  3. If an exception does not have a public constructor, such as SQLException, the marshaler seems to have an issue and again the consumer receives a CommunicationException.
  4. If you use a sessionless channel, i.e. Http, the channel will not fault when an unknown exception is thrown and caught. This differs from session-"aware" channels, which fault in such scenarios ... why not be consistent?

We will add more anomalies as they are encountered. We are NOT moaning about WCF ... we actually LOVE the stuff, but when considering maintenance developers, the anomalies as above are confusing and create unexpected maintenance.

Posted by willy with no comments
Filed under: , ,

WCF - Third Party Interoperability

If anyone has a list of tools that work well with all WCF services (especially basicHttp, WSHttpBinding) we would appreciate a pointer to the information and/or vendor site. In the interim MSFT has given us the following hints:

Chart at http://www.thearchitect.co.uk/weblog/archives/2006/09/000419.html has some information about which vendors support with features.

Some sites for web services of different vendors:

Posted by willy with no comments
Filed under: , ,

TFS BPA ... the ambitious journey and a quest to release an invaluable tool

The Team Foundation Server (TFS) Beat Practice Analyzer (BPA) tool is one of these ambitious projects that Microsoft has started to decrease the supporting cost of TFS/VSTS, to simplify the analysis and resolution of TFS/VSTS pre- and post-installations, as well as ad-hoc health checking of a TFS/VSTS environment. What makes it ambitious is that it is driven by a number of passionate experts, working on the tool in their own time, in parallel to their daily responsibilities, with the aim of releasing an invaluable tool to the TFS support and user community. Based on the success stories of other BPA tools, i.e. the Exchange Server BPA, the TFS BPA will become a standard tool in the toolbox of anyone involved with the support, consultancy and maintenance of TFS.

The key analysis attack sectors are: Pre-Installation, Partial-Installation and Health Check. The Pre-Installation contains the infamous FiFi (Find It Fix It) checks, for which I will release a quick reference poster in due course.

The list of the experts currently includes: BillE, BradP, BrettH, BrianH, EdwardP, JamesM, JamesS, JasonB, LadislauS, SudhirH and WilliamB ... and more.

The initiative was part of my 2-week sabbatical in Redmond, which I covered in my blog last month. If you are interested in this tool, catch me at DevDays in Johannesburg, or drop me an email.

Posted by willy with 1 comment(s)
Filed under: , ,

WCF Service Throttling Defaults

The throttling configuration of WCF can be used to prevent an over-utilization of services (throttling), or an increased default utilization of services when increasing the defaults. Currently the default values we are aware of are:

  • Concurrent Calls:          64 (16)
  • Concurrent Sessions:    10
  • Concurrent Instances:  Int32.MaxValue (21474836467)

This information will probably be raised in the WCF "drill down" session we are hosting at BB&D for the local community. 2 days of "fun"!

Posted by willy with no comments

WCF Fault Contract ... Exceptions to the rule of Exceptions, i.e. TFS TeamFoundationServerUnauthorizedException

In December I created and published a mini-poof of concept to demonstrate the various options of passing exceptions from a service to a consumer, using the WCF Fault Contract. What the mini-proof of concept did not cater for and which caused a few gray hairs, is the "exception" to the rule.

If you declare and throw an exception using the standard "WCF-way" and the exception is serializable, you can refer to http://dotnet.org.za/willy/archive/2006/12/19/WCF-FaultException-_2620_-why-use-it_3F00_.aspx for some of the common scenarios. If you stumble across an exception, such as TFS TeamFoundationServerUnauthorizedException, which is not serializable, you will fall into the "exceptional" black hole. The exception will never make its way to the consumer, in fact the consumer will receive a Fault that is in no ways related to the original exception.

By investigating and reviewing the actual exception ...

System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
contract:
http://tempuri.org/:IFaultDemoService ----> System.Runtime.Serialization.InvalidDataContractException: Type 'Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.
at System.Runtime.Serialization.DataContract.ThrowInvalidDataContractException(String message, Type type)
at System.Runtime.Serialization.DataContract.CreateDataContract(Int32 id, RuntimeTypeHandle typeHandle, Type type)
at System.Runtime.Serialization.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
at System.Runtime.Serialization.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type, SerializationMode mode)
at System.Runtime.Serialization.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type)
at System.Runtime.Serialization.DataContract.GetDataContract(Type type)
at System.Runtime.Serialization.DataContractSet.GetDataContract(Type clrType)
at System.Runtime.Serialization.XsdDataContractExporter.Export(Type type)
at System.ServiceModel.Description.MessageContractExporter.ExportType(Type type, String partName, String operationName, XmlSchemaType& xsdType)
at System.ServiceModel.Description.MessageContractExporter.ExportFaultElement(FaultDescription fault)
at System.ServiceModel.Description.MessageContractExporter.ExportFault(FaultDescription fault)

... we realise that the WCF plumbing is unable to serialize the exception, "throws its toys out of the cot" and punishes the consumer with a System.InvalidOperationException. Trying to add the non-serializable exceptions as an inner exception to a serializable exception just makes matters worse ... don't try.

Moral of the execption to the rule .. "if the exception cannot be serialized, do not throw as part of a FaultException in WCF".

At this stage we only have the following advise when dealing with exceptions:

  • Do no depend on the assumption that exceptions serialize in a standard way ... some like TFSTeamFoundationServerUnauthorizedExcetion will refuse to serialise at all.
  • Throw a FaultException and use the fault code to define the problem ... looks like we are heading back to the good old HRESULY and all its bit settings and bitmask manipulations.

Comments?

Posted by willy with no comments
Filed under: , , ,
More Posts Next page »