Web Services Generics Serialization Technology Sample
This sample shows how to use and control the serialization of generics in ASP.NET Web Services.
For information about using the samples, see the following topics:
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.
Note |
---|
The following steps are required to build the sample. |
Open Windows 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.
Important |
---|
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.
Important |
---|
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.
Type https://localhost/[virtual directory]/Service.asmx, where [virtual directory] represents the virtual directory you created when you built the sample.
Remarks
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.
See Also
Reference
System.Collections.Generic
System.Web.Services
System.Xml.Serialization
Other Resources
Serialization
XML Web Services Created Using ASP.NET and XML Web Service Clients