How to apply the WebMethod attribute?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
How to apply the WebMethod attribute?
Rating:
The HelloWorld public method is not available with the Web service until the WebMethod attribute is attached to it. Take the following steps to apply the WebMethod attribute:
- Use the following code to add the WebMethod attribute:
[WebMethod]
public string HelloWorld()
{
return "Hello World";
} - Attach the WebMethod attribute as shown in the following code window:
- Run the code; the following output window will open:
Rating:
Was this information helpful?
Other articles
- What is SOAP?
- What is the Singleton activation mode?
- What is COM+ object construction?
- What are the common application types used to create a remote server?
- What is fragment caching?
