Someone was asking today in the ASP.NET newsgroups if there was an easy way to apply a SoapExtension to a complete WebService-derived class, instead of applying his custom SoapExtensionAttribute-derived attribute class to each and every WebMethod.

I looked and, afaics, there isn't one [1], since it seems the runtime won't look at the class for soap extension attributes, just at the individual WebMethods. It's a shame, really. It sounded like a good suggestion to me to add support for that, and would be consisten with how other attribute-based features work in the asp.net web services runtime (one example would be SoapDocumentMethodAttribute and SoapDocumentServiceAttribute)

[1] One could instead register the extension web.config, but that somehow doesn't seem as clean :)


Tomas Restrepo

Software developer located in Colombia.