Generating Web Services in .NET

The deployment of a Web service consists in copying the generated implementation class and .ASMX file into the directory of the web server virtual folder.

The .ASMX is an ASP.NET file, it contains the code of the C# or VB.NET Web service class.

  1. Select Language > Generate C# Code or Generate VB .NET Code.
  2. Select the generation directory. You can select a Microsoft Internet Information Server (IIS) directory for generation, for example, C:\Inetpub\wwwroot\StockQuote. If you have defined you Web Services inside a package, you can generate the Web Services code in the C:\Inetpub\wwwroot directory. Each package will create a subdirectory.
  3. Set the Generate Web Service C# code in .asmx file option to false in the Options tab if you want to generate the C# or VB .NET class outside a .asmx file.
  4. Select the Compile C# code or VB .NET code command in the Tasks tab if you generate the C# or VB .NET Web Service class outside a .asmx file.
  5. Click OK.

    The code generation process creates a subdirectory under wwwroot using the package name, and creates a <WebServiceName>.ASMX file within the subdirectory.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com