'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
Change the class to derive from WebService.
— or —
Remove the WebMethodAttribute attribute from the method.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: