'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

See Also

Tasks

Walkthrough: Creating a Web Service Using Visual Basic or Visual C#