I have an application that is an asmx web service written in .NET 2.0 with some business logic and a repository sitting underneath it.
The plan is that this web service will serve as the API for applications that want the data that it saves and retrieves.
Longer term, I know that the web service is likely to be replaced by a WCF service when the .NET 2.0 code base is refactored and becomes a .NET 4 codebase.
In order to reduce the impact on consumers of the API, I am considering whether it is a good idea to drop a WCF service as a facade over the asmx service. This will remain in place while the .NET 2.0 code is refactored. When there is no .NET 2.0 code left, the asmx service will disappear and the WCF service will talk to the business logic without an asmx service in the way.
My questions are
What kind of performance overhead will this cause?
Is there a better solution to this problem?
I read your question as “can I reference a .Net 2.0 component from a .Net 4 WCF service”
This link
confirms
The .NET Framework 4 is backward-compatible with applications that were built with the .NET Framework versions 1.1, 2.0, 3.0, and 3.5. In other words, applications and components built with previous versions of the .NET Framework will work on the .NET Framework 4.