The following file is available for download from the Microsoft Download Center:
Release Date: May 2, 2002
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591�
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
This self-extracting executable file contains two Windows Installer packages that install the following ASP.NET Web services samples:
- WebServicesSamples_Setup.msi installs the Web services to the Inetpub/Wwwroot/WebServicesSamples directory.
- WebServiceClients.msi installs the sample clients for the Web services to the directory of your choice.
The Webservicessamples.exe file contains the following samples:
- AsyncMathService: This sample demonstrates calling ASP.NET Web services asynchronously. The Add Web method sleeps for a while to simulate a long running process. The client has two buttons: one button calls the Add Web method synchronously, and the other button calls the Add Web method asynchronously.
- ExceptionService: This sample demonstrates throwing a SoapException error from a Web method in an ASP.NET Web service and catching that exception in the client.
- SecureWebService: This sample demonstrates Web service authentication. The Web service is a simple Web service. The client has the logic to send authentication credentials. The virtual directory for this Web service must be protected by using Basic authentication and Secure Sockets Layer (SSL), and must require client certificates.
- SimpleService: This sample demonstrates a simple ASP.NET Web service. The sample shows the use of the WebMethod and the Webservice attributes.
- SoapCustomMessage: This sample demonstrates how to format Simple Object Access Protocol (SOAP) messages from the ASP.NET Web service by using the SoapDocumentMethod and the SoapRpcMethod attributes. When you use this sample, you must use a monitoring tool such as Network Monitor to see the formatted SOAP messages.
- SoapHeaders: This sample demonstrates how to implement SOAP headers in ASP.NET Web services.
- SoapTraceExtension: This sample demonstrates how to implement a simple SOAP extension that logs the input and output messages to and from the ASP.NET Web service to the C:\Log.txt file.
- StateManagementDemo: This sample demonstrates how to implement state management in ASP.NET Web services.
Using the Samples
The samples that the
Webservicessamples.exe file includes require Microsoft Visual Studio .NET (Enterprise edition) to be installed on either Microsoft Windows 2000, Microsoft Windows NT 4.0, or Microsoft Windows XP systems. The system must have Microsoft Internet Information Services 5.0 as the Web server.
- Download and extract the Webservicessamples.exe self-extracting .zip file.
- Double-click the WebServicesSamples_Setup.msi file (or right-click the WebServicesSamples_Setup.msi file and then click Install), and then follow the instructions to install the Web services samples.
- Double-click the WebServiceClients.msi file (or right-click the WebServiceClients.msi file and then click Install), and then follow the instructions to install the Web services clients.
- In the directory in which you installed the Web services clients, double-click the WebServicesClients.sln file to open the Web services clients solution where you can build and view the sample Web services clients.
- Because the SecureWebClient project uses server certificates and SSL to access a secure Web service, you must follow these steps to use that project. The other Web service samples run without these modifications.
- Follow the steps in the following Knowledge Base article to create and install a server certificate for the WebServicesSamples\SecureWebService virtual directory:
228836�
Installing a New Certificate with Certificate Wizard for Use in SSL/TLS
- In the Solution Explorer, right-click the SecureWebClient project, and then click Add Web Reference.
- In the Address edit box, type http://servername/WebServicesSamples/SecureWebService/SecureWebService.asmx?wsdl (where servername is the name of your Web server where the Web services samples are installed), and then press ENTER.
- Click Add Reference to add the reference.
- In the SecureWebClient project, open Form1.cs.
- On the Edit menu, click Find and Replace, and then click Replace to replace all instances of "localhost" with the name of the server where you installed the Web services samples.
- The SecureWebClient project needs a client-side certificate (C:\Clicert3.cer). To create the certificate, download Authenticode for Internet Explorer 5.0 from the following Microsoft Developer Network (MSDN) Web site:
- Use the makecert.exe c:\clicert3.cer command-line command to create the client-side certificate.
- Use the samples to supplement the Advanced XML Web Services Support WebCast.