Web Services Generics Serialization Technology Sample
This sample shows how to use and control the serialization of generics in ASP.NET Web Services.
To build the sample using Visual Studio
Open Visual Studio and select New Web Site from the File menu.
In the New Web Site dialog, select from the left pane your desired programming language, then from the right pane, select ASP.NET Web Service.
Click Browse and navigate to the \CS\GenericsService subdirectory.
Select Service.asmx to open the file in Visual Studio.
On the Build menu, click Build Solution.
The first five steps in this list are optional. The .NET Framework runtime will automatically generate the Web service the first time the service is requested.
The following steps are required to build the sample.
Open File Explorer and navigate to the \CS subdirectory.
Right-click the icon for the GenericsService subdirectory, and select Sharing and Security.
In the Web Sharing tab, select Share this Folder.
Take note of the virtual directory name that is listed in the Aliases pane, because you will need it to run the sample.
To build the sample using Internet Information Services
Open the Internet Information Services management snap-in and expand Web Sites.
Left-click Default Web Site, select New, and then select Virtual Directory? to create the Virtual Directory Creation Wizard.
Click Next, enter the public alias for your virtual directory, and click Next.
Enter the path to the directory where you saved the sample (normally the \CS\GenericsService subdirectory) and click Next. Click Next to finish the wizard.
Take note of the virtual directory name that is listed in the Alias pane, because you will need it to run the sample.
To run the sample
Open a browser window and select its address bar.
http://localhost/[virtual directory]/Service.asmx, where
[virtual directory]represents the virtual directory you created when you built the sample.
The sample displays a default ASP.NET page that contains links to the definition of the Web Service. You can customize the display in addition to modifying the source code for the Web service. For more information, see Building XML Web Service Clients.