Apply Your Knowledge

Exercises

5.1. Configuring a SOAP Extension with a Config File

In the chapter you saw how to configure a SOAP extension to run with a particular Web method by applying a custom attribute to that method. However, there's a second way to configure a SOAP extension. Instead of applying attributes one method at a time, you can use a configuration file to cause a SOAP extension to run with every Web method in the scope of the configuration file.

Estimated Time: 35 minutes.

1.
Add a new Visual C# .NET Class library project to the 320C05 solution. Name the new library SoapExt.
2.
Rename the default Class1.cs file to SoapDisplayExtension.cs.
3.
Right-click the References node in Solution Explorer and select Add Reference. Add a reference ...

Get MCAD/MCSD Training Guide (70-320): Developing XML Web Services and Server Components with Visual C#™ .NET and the Microsoft .NET Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.