Kirk Evans Blog

.NET From a Markup Perspective

How I Became a SharePoint 2010 MCM

I recently attained the Microsoft Certified Master for SharePoint 2010 certification.  I have long wanted to write about the experience, but honestly didn’t know how to begin.  After quite a few conversations with friends and colleagues, I thought I would share some insight about the process.  I am not writing this to dissuade you from… Read more

Modify Message Content With WCF

Plenty of resources talk about extensibility in WCF, and mention IClientMessageInspector and IDispatchMessageInspector as ways to look at the content of a message, usually dumping to some sort of log.  In this post, I’ll highlight their obvious strength:  the capability to change the content of a message. This post really should be titled something like,… Read more

Inline an XML Schema into Your XML Document

A good friend of mine, Derek Noonan, pinged me to ask how to inline an XML Schema into an XML document. For instance, think about a WSDL document that has the schema types inline with the WSDL document itself, you would want to figure out how to pull the schema information from the WSDL document… Read more

Some XmlSerializer Control in ASMX

A customer pinged me asking how to control various aspects of the XmlSerializer in ASMX. Here are a few of the ways that you can control the XmlSerializer and how it projects its contract through WSDL.   using System; using System.Web.Services; using System.Xml; using System.Xml.Serialization;     [XmlType(“CustomerType”)] public class Customer { private string _first;… Read more

Those XML Features Are in VS2005, You Don’t Have to Wait for Orcas!

InfoQ posts about 5 short demos on features you will find in Orcas.  Glad to see some buzz being generated about Visual Studio “Orcas” features, but… The Data team’s post (the one that the InfoQ article points to) is a little misleading.  The post refers to a recent keynote at VSLive! in San Francisco that showed… Read more

ASMX 2.0 and SchemaImporterExtensions

I like the concept of SchemaImporterExtensions in ASMX 2.0.  As you import the schema through proxy generation using WSDL.exe, you can generate your own code to control serialization for the client. This can be a great tool if you have a particularly nasty interop problem and the generated proxy code doesn’t work.  For instance, Dan… Read more

High-Performance Web Services: Avoid XmlNode, Use IXmlSerializable

While talking with a friend about web services design and “commonplace” guidance, the discussion turned ugly.  I was somewhat amazed to hear his perception that Microsoft commonly recommends returning XmlNode from all web services.  I let him argue it out, looking for where in the world he derived this “commonplace” notion of untyped web services… Read more

Cool Visual Studio 2005 Feature: Snippets and Document Inference

I love learning new featuresof Visual Studio.  Today, I saw an email from Chris Lovett where he showed a feature of snippets that I had no idea existed.  Intellisense in an XML document will actually create an XML document inferred from an associated schema. Start with an XML schema.  Here, I created a simple complex… Read more

Control Serialization and XSD.exe Using .NET 2.0

Keith is asking for a version of XSD.exe that lets him control serialization, specifically controlling properties versus fields in the generated proxy and control of collection serialization.  Might as well give us an extensible xsd.exe compiler that actually allows us to control the xsd->class mappings (properties versus fields, COLLECTIONS versus arrays, etc). I say this… Read more

Should You Learn WS-* Specs Now?

In Tim Ewald’s post, “I refuse to let the angle brackets fall where they may!”, he brings up the point about starting with the XML, then designing the XML schema, then the WSDL, then finishing with a stylized set of classes.  In the comments, Ben Lowery asks if this contradicts recent messages of devs not… Read more