Apply Your Knowledge

Exercises

11.1. Building a Client for a Secure Web Service

In the chapter, you saw how to configure a Web Service to require authentication. But how do you build a client that can supply credentials? In this exercise, you'll learn how to alter the proxy class in a Web service client project to pass the current user's credentials to a Web service, using the StringProc Web service that you constructed in Chapter 4.

Estimated Time: 15 minutes.

1.
Launch Visual Studio .NET. Select File, New, Blank Solution and name the new solution 320C11Exercises.
2.
Add a new Visual C# .NET Windows application named Exercise11_1 to the solution.
3.
In the Solution Explorer, rename the default Form1.cs to Exercise11_1.cs. Open the form in code ...

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.