Compartilhar via


@ WebService Directive in XML Web Services 

Defines XML Web service specific (.asmx file) attributes used by the ASP.NET parser and compiler.

<%@ WebService attribute="value" [attribute="value"…] %>

Attributes

  • Class
    Specifies the class implementing the XML Web service that is automatically compiled the first time the XML Web service is accessed after changes. This value can be any valid class name residing in either the same file as the WebService directive or within a separate file. If the class resides in a separate file, it must be placed in the \Bin directory underneath the Web application where the XML Web service resides. This attribute is required for the XML Web service to compile.
  • CodeBehind
    Specifies the source file implementing the XML Web service, when the class implementing the XML Web service does not reside in the same file and has not been compiled into an assembly and placed in the \Bin directory.
  • Debug
    Indicates whether the XML Web service should be compiled with debug symbols. true if the XML Web service should be compiled with debug symbols; otherwise, false.
  • Language
    Specifies the language used when compiling all inline code within the XML Web service file (.asmx). The values can represent any .NET-supported language, including C#, VB, and JS, which refer to C#, Visual Basic .NET, and JScript .NET, respectively.

See Also

Tasks

Building XML Web Services Using ASP.NET Basics

Other Resources

XML Web Services Using ASP.NET
XML Web Services Directives