@ WebService Directive in XML Web Services

This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation.

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

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





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.


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.


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.


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


ASP.NET XML Web Service Basics

Other Resources

XML Web Services Using ASP.NET