.NET: How to abandon WebMethod?

Is there a standard way in .NET to indicate that a web service method has been deprecated ?

To clarify, by the β€œweb services” method, I mean the method that was decorated with the [WebMethod] attribute.

Is it standard practice to just use the [Obsolete] attribute to mark it as deprecated like any other method?

+6
source share
1 answer

Yes; standard practice is to use the [Obsolete] attribute for obsolescence in .NET.

EDIT:

Keep in mind that this will not formally apply to the WSDL / service, as shown to the consumer. Because WS is the standard for all technologies; protocol must be followed. With this in mind, your goal of distributing changes to the consumer, unfortunately, will be related to the release of notes, as indicated in this question . Although not perfect, it provides a vehicle for obsolescence.

+6
source

Source: https://habr.com/ru/post/886255/


All Articles