'WebMethod' attribute will not affect this member because its containing class is not exposed as a web service
The WebMethodAttribute attribute makes a method callable from remote Web clients, but only when the method's class derives from WebService.
Error ID: BC30771
To correct this error
Change the class to derive from WebService.
— or —
Remove the WebMethodAttribute attribute from the method.
See Also
Tasks
Walkthrough: Creating a Web Service Using Visual Basic or Visual C#