I am trying to convert a codebase from .NET 4.7.2 to .NET 7 and I have a few interfaces where I am using WebGet attributes to be later used with WCF endpoints.
[System.ServiceModel.Web.WebGet(UriTemplate = "", BodyStyle = WebMessageBodyStyle.Bare)]
I am unsure what to use instead of the WebGet attribute because of the assembly System.ServiceModel.Web seems to be gone in .NET 7.
Any ideas on how to port this functionality to .NET 7?
The CoreWCF Project team has released CoreWCF, a port of WCF to the .NET Core platform. It provides a compatible implementation of SOAP, NetTCP, and WSDL. Usage in code is similar to WCF, but updated to use ASP.NET Core as the service host, and to work with .NET Core. This is the first major release of the project, and provides WCF functionality for .NET Core, .NET Framework, and .NET 5+.
This is the version documentation for corewcf:CoreWCF Support Policy
At the same time, CoreWCF.WebHttp in CoreWCF I think can solve your problem.
This is an example of CoreWCF.WebHttp that I think will help you:CoreWCF.WebHttp